📅  最后修改于: 2022-03-11 15:05:15.989000             🧑  作者: Mango
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;