SQL to update the salary of employees with their department's average salary
问题 Consider the table employee : desc employee; Name Null? Type -------------------------- -------- ------------ EMPLOYEENO NOT NULL NUMBER(4) ENAME VARCHAR2(15) JOB VARCHAR2(15) MGR NUMBER(4) HIREDATE DATE SAL NUMBER COMM NUMBER DEPTNO NUMBER(2) Contains with values of deptno , sal as: DEPTNO SAL ---------- ---------- 10 2450 10 5000 10 1300 20 2975 20 3000 20 1100 20 800 20 3000 30 1250 30 1500 30 1600 30 950 30 2850 30 1250 Need to update the salary of employees with their department's