oracle之单行函数之子查询
生活随笔
收集整理的這篇文章主要介紹了
oracle之单行函数之子查询
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
--睡得工資比abel高
select last_name,salary
from employees
where salary>(select salary
from employees
where last_name='Abel')
運行結果
--返回job_id 與141號員工相同 salary比143號多 select last_name,job_id,salary from employees where job_id=(select job_id from employees where employee_id=141 ) and salary>(select salary from employeeswhere employee_id =143 )運行結果
--返回工資最少的員工 select last_name,job_id,salary from employees where salary=( select min(salary) from employees )運行結果
--茶語最低工資大于50號最低工資的部門id和工資 select department_id,min(salary) from employees group by department_id having min(salary)>( select min(salary) from employees where department_id=50)運行結果
?
總結
以上是生活随笔為你收集整理的oracle之单行函数之子查询的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【蓝桥杯历年题】2020蓝桥杯A组省赛第
- 下一篇: 前端学习(1534):服务器和客户端传输