当前位置:网站首页>MySQL winter vacation self-study 2022 11 (5)

MySQL winter vacation self-study 2022 11 (5)

2022-07-06 02:25:00 Crane paper thousand

Keywords of subquery

all any some in exists

use mydb3;
--  Query age is greater than '1003' Employee information of all ages in the Department 
select * from emp3 where age > all (select age from emp3 where dept_id = '1003');
--  Query employee information that does not belong to any department 
select * from emp3 where dept_id != all (select deptno from dept3); 

原网站

版权声明
本文为[Crane paper thousand]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140023141053.html