会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
古兰精
博客园
首页
新随笔
联系
订阅
管理
2021年9月4日
浅析SQL中 in 与 exists 用法的区别及其各自执行流程、not in/not exists区别、sql优化应该如何选择in还是exists
摘要: 一、in 与 exists 的区别 1、exists、not exists 一般都是与子查询一起使用,In 可以与子查询一起使用,也可以直接in (a,b.....) 2、exists 会针对子查询的表使用索引,not exists 会对主子查询都会使用索引。in 与子查询一起使用的时候,只能针对主
阅读全文
posted @ 2021-09-04 18:08 古兰精
阅读(1434)
评论(0)
推荐(1)
编辑
公告