效率的比较???
[解决办法]
把执行计划发上来,效率和你表里面的数据大小相关。
空谈sql 性能好不好 是空话,不实际
[解决办法]
一看执行计划;
二看IO读取;
如果相应的索引都建立好了,我会用这种写法:
[解决办法]
你再试试这个
select top 2000 id from
(
select id from A
except
select id from B
) as table
[解决办法]
select top 20000 A.id from A where not exists (select 1 from b where B.id=A.id)这个比较好