SQLSERVER语句 in和exists哪个效率高本人测试证明
1 回答
慕斯709654
TA贡献1840条经验 获得超5个赞
例如下面两个SQL语句
1 SELECT OrderNo, SiteCode, AreaCode
2 FROM SchedulingProgram
3 WHERE AreaCode IN ( 'P', 'M' ) AND SiteCode IN ( SELECT SiteCode
4 FROM EnvBasicInfo
5 WHERE cityiD = 31 ) AND OrderNo NOT IN (
6 SELECT OrderNo
7 FROM KK_DeliveryinfoTmp )
上面SQL语句IN里面有IN和NOT IN
1 SELECT OrderNo, SiteCode, AreaCode
- 1 回答
- 0 关注
- 645 浏览
添加回答
举报
0/150
提交
取消