I need to copy ref_id1 from table1 TO the column ref_id2 in the table2 the two things matching will be : id (same column name), a_ref1 & b_ref1 (column names are differe
What you want is
UPDATE Table2 SET ref_id2 = table1.ref_id1 FROM table1 WHERE table1.id = table2.id AND table1.a_ref1 = table2.b_ref1;
Edit This is what you actually want
As seen here (crudely)