I have a table EMP
that looks like this
EID || ENAME || ESAL || LOC
------------------------------------------------------------
1111 || David Rockwell || 50000 || -
2222 || Michael Bubey || 33000 || -
3333 || Samuel Lukas || 35000 || -
5555 || Mike Pribley || 35000 || -
I have another table DEPT
that looks like this
DEPT_ID || DNAME || LOCATION
-----------------------------------------------
1111 || ABC || USA
2222 || DEF || Japan
3333 || GHI || UK
4444 || JKL ||Brazil
5555 || LMO || India
My aim is to insert the values of dept.LOCATION
into emp.LOC
NOTE:
- The insertion should be such that the
emp.loc=dept.LOCATION
wheredept.dept_id=emp_eid
- There are no constraints in any of the tables. (You are free to add in your solution)
RESULT
EID || ENAME || ESAL || LOC
------------------------------------------------------------
1111 || David Rockwell || 50000 || USA
2222 || Michael Bubey || 33000 || JAPAN
3333 || Samuel Lukas || 35000 || UK
5555 || Mike Pribley || 35000 || India
Thank you for your support.