select * from A where id not in (一堆具体的值);
我遇到的情况是查询出A表的所有内容,not in 没有效果
解决方案:
我的做法是将not in 后面的值存到一张临时表B中,
select * from A where id not in (select id from B)
select * from A where id not in (一堆具体的值);
我遇到的情况是查询出A表的所有内容,not in 没有效果
解决方案:
我的做法是将not in 后面的值存到一张临时表B中,
select * from A where id not in (select id from B)