I have two tables Emp & Dept.
SQL> select * from emp where rownum<4; EMPNO ENAME JOB MGR SAL DEPTNO ---------- ---------- --------- ---------- ---------- ---------- 7369 SMITH CLERK 7902 800 7499 ALLEN SALESMAN 7698 1600 7521 WARD SALESMAN 7698 1250 SQL> select * from dept; DEPTNO DNAME LOC EMPNO ---------- --------------- --------------- ---------- 10 ACCOUNTING NEW YORK 7369 20 RESEARCH DALLAS 7499 30 SALES CHICAGO 7521 40 OPERATIONS BOSTON i want to update deptno of emp which should be same as deptno of dept table & where empno of dept should be equal to empno of emp; In short i want to update dept using inner join operation with emp;