oracle之数据处理之课后练习
生活随笔
收集整理的這篇文章主要介紹了
oracle之数据处理之课后练习
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
55. 更改 108 員工的信息: 使其工資變為所在部門中的最高工資, job 變為公司中平均工資最低的 job1). 搭建骨架update employees set salary = (), job_id = () where employee_id = 108;2). 所在部門中的最高工資 select max(salary)from employeeswhere department_id = (select department_idfrom employeeswhere employee_id = 108)3). 公司中平均工資最低的 jobselect job_idfrom employeesgroup by job_idhaving avg(salary) = (select min(avg(salary))from employeesgroup by job_id)4). 填充update employees e set salary = (select max(salary)from employeeswhere department_id = e.department_id), job_id = (select job_idfrom employeesgroup by job_idhaving avg(salary) = (select min(avg(salary))from employeesgroup by job_id)) where employee_id = 108;56. 刪除 108 號員工所在部門中工資最低的那個員工.1). 查詢 108 員工所在的部門 idselect department_idfrom employees where employee_id = 108;2). 查詢 1) 部門中的最低工資:select min(salary)from employeeswhere department_id = (select department_idfrom employees where employee_id = 108)3). 刪除 1) 部門中工資為 2) 的員工信息:delete from employees ewhere department_id = (select department_idfrom employees ewhere employee_id = 108) and salary = (select min(salary)from employeeswhere department_id = e.department_id)
?
總結
以上是生活随笔為你收集整理的oracle之数据处理之课后练习的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 生物力学有限元Mimics/ANSYS
- 下一篇: java面试题1 牛客:A派生出子类B,