i want to update my table with data in another table in oracle sql for example
Table 1:
ID NAME DESC
---------------------------
1 mac first
2 donald second
3 robert third
Table 2:
ID NAME DESC
-----------------------
3 SALAH forth
5 AHMED fifth
so now i want to run sql update statement to update table 1 by data located in table 2 which is two table are equals in ID’s, so the final result would be like this
ID NAME DESC
---------------------------
1 mac first
2 donald second
3 SALAH forth
thanks in advance.
This called correlated update you can find examples below
in you sample :
alternative way you can do this
and now the final example is