Answers for "copy table data from one database to another postgres"

SQL
1

postgres copy table from one schema to another

create table schema2.the_table (like schema1.the_table including all);
insert into schema2.the_table
select * 
from schema1.the_table;
Posted by: Guest on June-15-2020
0

copy from one table to another postgres using matching column

UPDATE Table2 --format schema.table_name
SET 
ref_id2 = table1.ref_id1
FROM table1 -- mention schema name
WHERE table1.id = table2.id
AND 
table1.a_ref1 = table2.b_ref1;
Posted by: Guest on May-24-2020

Code answers related to "copy table data from one database to another postgres"

Code answers related to "SQL"

Browse Popular Code Answers by Language