Py学习  »  Avitus  »  全部回复
回复总数  1
16 年前
回复了 Avitus 创建的主题 » MySQL查询优化

我将离开ID为空的join table2。 这将使您更快地返回数据。

select
     a.id
from
     table1 a 
     left join table2 b on a.id = b.id and b.id is null