当前位置: 代码迷 >> 综合 >> MySql not in 优化
  详细解决方案

MySql not in 优化

热度:81   发布时间:2024-02-10 23:21:18.0

表 A 表 B

Select  a.*  From A a Where  a.bid not in (Select b.id From B b)

优化之后

Select  a.id  From A a  Left Join  B b on b.id=a.bid

where b.id is null

 

  相关解决方案