Sorry for this very basic newbie DB question...
I have two tables with the same columns but want to replace the values of one of the columns in the first table with the values of the corresponding column in the second table.
I.e. table1: name, age table2: name, age
Each table has the same "name" values, just with different ages.
Algorithmically: For each row in table1, find the row in table2 with the same name and make table1.age = table2.age
The database is Oracle. I've tried something like
update table1 set table1.age = (select table2.age where table2.name = table1.name)
thinking it might do an implicit join if needed but no luck. I've also tried explicitly doing an inner join with no luck.
Thanks!
ORA-01427error? - Vasyl Moskalov