Quantcast
Channel: How to do an update + join in PostgreSQL? - Stack Overflow
Viewing all articles
Browse latest Browse all 19

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

$
0
0

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 all articles
Browse latest Browse all 19

Trending Articles