Skip to content
Advertisement

Transfer data from one table to another with both table having same id, in Postgres

I have 2 tables. TBL_A and TBL_B. I want to update TBL_A so that A_NAME = B_NAME, where A_LA = B_LA. How do I do this?
This is just s sample data. In the real table, I have thousands of records on each table.
I tried connecting both tables using View, but it seems that the view can’t be updated.

TBL_A:
enter image description here

TBL_B:
enter image description here

View:
enter image description here

Advertisement

Answer

You can do it in this way:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement