ITPUB论坛 » 移动及嵌入式数据库 » 求救A表与B表有相同的字段aa bb,求B表中不存在于A表中的纪录


2008-1-8 12:48 bailuotuo
求救A表与B表有相同的字段aa bb,求B表中不存在于A表中的纪录

求救A表与B表有相同的字段aa bb,求B表中不存在于A表中的纪录

2008-1-8 12:53 wenshaohan
select * from b
where aa+bb not in ( select aa+bb from a);

2008-1-8 12:53 wenshaohan
select * from B a
   where not exists (select * from A
         where aa = a.aa and bb = a.bb)

页: [1]


Powered by ITPUB论坛