A,B两个表字段不同,但是B表中含有一个connid字段对应与A表中的id,怎么查出在A中并且id没有在表B中的记录....好乱~~~
------解决方案--------------------
select id from a
where not exists(select 1 from b
where b.id=a.id)
------解决方案--------------------
真替你捉急 select * from a where not exists (select 1 from b where b.connid = a.id)
------解决方案--------------------
select a.* from A a where not exists
(select 1 from B b where b.connid = a.id)
------解决方案--------------------
恩 都是可以的