84669 人學習
152542 人學習
20005 人學習
5487 人學習
7821 人學習
359900 人學習
3350 人學習
180660 人學習
48569 人學習
18603 人學習
40936 人學習
1549 人學習
1183 人學習
32909 人學習
實作:查詢a中沒有關聯b的記錄
1、select id from a left join b on a.id = b.aid where b.id is null and status = 1
2、select id from a where id not in (select aid from b) and status = 1
那種更好,或有其他的方式,請大神留下答案
认证0级讲师
不存在正確答案
我想使用 not exists
淺談sql中的in與not in,exists與not exists的區別
不存在正確答案
雷雷我想使用 not exists
淺談sql中的in與not in,exists與not exists的區別