I have the following situation:
Bank and the B bank both with the Customers table with the following data:
A.clientes B.clientes
id | nome id | nome
------------------- -------------------
1 | Lucas 1 | Mauro
5 | Marcos 3 | Sergio
8 | Paulo
I would like a command to update and insert the data that was in the clients table of the A database into the clients table of the B database and that this was the result:
B.clientes
id | nome
-------------------
1 | Lucas <- UPDATE
3 | Sergio
5 | Marcos <- INSERT
8 | Paulo <- INSERT
My SGDB is PostgreSQL.