SQL,标题太短没法描述~~T T
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)