首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

如果用 exists 代替 in 那 not in 是否也有代替呢?解决思路

2012-02-28 
如果用 exists 代替 in那 not in 是否也有代替呢?如题[解决办法]select * from tableA as a where NOT EXI

如果用 exists 代替 in 那 not in 是否也有代替呢?
如题

[解决办法]
select * from tableA as a where NOT EXISTS(select 1 from tableB as b where b.ID = a.ID)

热点排行