社区
MS-SQL Server
帖子详情
请问,将not in 改成not exists怎么改?谢谢!急!
fanrj
2003-05-15 10:46:12
将下列语句
select top 20 * from sale where salenumber not in (select top 10 salenumber from sale)
中的not in改成not exists怎么改!
谢谢!
...全文
287
5
打赏
收藏
请问,将not in 改成not exists怎么改?谢谢!急!
将下列语句 select top 20 * from sale where salenumber not in (select top 10 salenumber from sale) 中的not in改成not exists怎么改! 谢谢!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
enhydraboy
2003-05-15
打赏
举报
回复
agree tj_dns(愉快的登山者)
fanrj
2003-05-15
打赏
举报
回复
但是,好像用not in 执行速度很慢阿
firetoucher
2003-05-15
打赏
举报
回复
up,同意楼上,我的一样,还是不写了,以免有抄袭之嫌:)
愉快的登山者
2003-05-15
打赏
举报
回复
这种情况最好用not in。
not exists可以实现,但不如前者:
select top 20 * from sale as A where not exists
(select * from (select top 10 salenumber from sale) as B
where salenumber = A.salenumber)
liukanghui
2003-05-15
打赏
举报
回复
in 和 exists差不多的,想怎么用怎么用
把not in
改
成
not
exists
后的优化
把not in
改
成
not
exists
后的优化 近期,OA数据库里面存在一条慢SQL,其执行时间为3分16秒。这条慢SQL语句每个月可能会运行几次,但其运行后,总会导致...
浅谈sql中的in与not in,
exists
与not
exists
的区别以及性能分析
浅谈sql中的in与not in,
exists
与not
exists
的区别
not in SQL语句转化为 not
exists
not in 语句效率比not
exists
效率要低.在对sql执行效率要求比较高的情况下,需要把not in 语句转化为not
exists
. 有数据表如下图: 现在需要找出在ParentMissionID列中存在但在MissionID列中不存在的数字. 用not...
NOT IN sql转成 NOT
EXISTS
sql
NOT IN sql转成 NOT
EXISTS
sql第一步第二步 下面展示一个 NOT IN sql。用来演示如何转换成NOT EXIST sql 其中,na表的permission_id是nr表的id SELECT * FROM net_note_resource nr WHERE nr.id NOT IN ( ...
oracle not
exists
not in,Oracle
exists
/in和not
exists
/not in之前的区别与联系
之前写过一篇关于NULL对in和not in结果的影响:Oracle的where条件in/not in中包含NULL时的处理。今天来看看
exists
和not
exists
中NULL值对结果的影响。网上经常看到关于in和exixts、not in和not
exists
性能比对和互换...
MS-SQL Server
34,874
社区成员
254,639
社区内容
发帖
与我相关
我的任务
MS-SQL Server
MS-SQL Server相关内容讨论专区
复制链接
扫一扫
分享
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章