I have 2 databases named DB1 and DB2 with a table called movies. movie contains movie_name, year, synopsis, AKA etc. As you can see synopsis and AKA columns are empty. I want to match two columns (movie_name and year) and insert identical results into DB1’s empty columns.
DB1.movies
movie_name | year | synopsis | AKA
----------------------------------------
titanic | 1997 | |
matrix | 1999 | |
alien | 1979 | |
DB2.movies
movie_name | year | synopsis | AKA
----------------------------------------
titanic | 1997 | xxxxxxx | XXX
matrix | 1999 | yyyyyyy | YYY
alien | 1979 | zzzzzzz | ZZZ
After then, DB1.movies should look like this:
DB1.movies
movie_name | year | synopsis | AKA
----------------------------------------
titanic | 1997 | xxxxxxx | XXX
matrix | 1999 | yyyyyyy | YYY
alien | 1979 | zzzzzzz | ZZZ
What can I do?
Thanks!
This should do the trick:
Note I didn’t know the table names for the tables in db1 and db2, so I just called them table1 and table2 respectively.