使用SQL查找A表,条件为A表中有但B表中没有的记录,A,B两表关联字段为id

这语句怎么写

第1个回答  2015-02-22
select * from A where not exist select null from b where b.id=id
好像是这样写的
in 的开销比较大本回答被提问者和网友采纳
第2个回答  2015-02-22
select * from A where id not in (select id from B)
相似回答