I have two databases with similar data but what I want to do is to update the changes of sample_table from Database2 to sample_table of Database1.
Example:
Database1 [sample_table]
ID Reference Name
0001 Ref0001 Test1
0002 Ref0002 Test2
Database2 [sample_table] - with changes
ID Reference Name
0001 Ref0001 Name1
0002 Ref0002 Name2
In the sample_table of Database2, I changed the data in the Name field and I want to apply the changes in the sample_table in Database1. What SQL query to execute to do this? I'm using pgAdminIII and pgAdmin4. (both databases are on the same server)
If you have any questions, comment below.