如果用 exists 代替 in 那 not in 是否也有代替呢?
如题
[解决办法]
select * from tableA as a where NOT EXISTS(select 1 from tableB as b where b.ID = a.ID)
发布时间: 2012-02-28 13:06:35 作者: rapoo
如果用 exists 代替 in 那 not in 是否也有代替呢?
如题
[解决办法]
select * from tableA as a where NOT EXISTS(select 1 from tableB as b where b.ID = a.ID)