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;
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;
copy table postgres
CREATE TABLE new_table AS
TABLE existing_table;
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;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us