当进行一个查询时,需要的条件或者数据要用另一个select语句得结果
可分为两种:
第一种:where
1.单值:
#select name,salary from employee where salary=(select max(salary) from employee)
2.多值:
# select name,salary from employee where salary in (select salary from employee where name in (‘a‘,‘b‘,‘c‘))
# select name,salary from employee where salary =any (select salary from employee where name in (‘a‘,‘b‘,‘c‘))
原文:https://www.cnblogs.com/hapyygril/p/13164541.html