MySQL系列-优化之精准解读in和exists

1.解读in和exists 这两个关键字的区别主要是在于子查询上面,in是独立子查询,exists是相关子查询,例如: 用in查询有员工的部门       :select dept_name from dept where id in (select dept_id from emp); 用exists查询有员工的部门:select dept_name from dept where exists
相关文章
相关标签/搜索