Quantcast
Viewing latest article 9
Browse Latest Browse All 19

Answer by AritraDB for How to do an update + join in PostgreSQL?

First Table Name: tbl_table1 (tab1).Second Table Name: tbl_table2 (tab2).

Set the tbl_table1's ac_status column to "INACTIVE"

update common.tbl_table1 as tab1set ac_status= 'INACTIVE' --tbl_table1's "ac_status"from common.tbl_table2 as tab2where tab1.ref_id= '1111111'and tab2.rel_type= 'CUSTOMER';

Viewing latest article 9
Browse Latest Browse All 19

Trending Articles