比如表A主键id与表B的外键a_id关联,要在A表中查出id不等于B表中所有a_id的记录: not in 写法: select * from A where id not in (select a_id from B where a_id = A.id ) not exists写法: select * from A where id not exists (select 1 from B where a_id = A.id)
唑洅湾仔頂樓,窗邊菂佬鹰飝翔嗻
posted on
2009-03-17 15:24Madream.F
阅读(225)
评论(0)
收藏举报