I cannot make this query (attached in code) work (Oracle 11gR2).
I want to update three fields of the table F2 from the table F1 based on the matching field of "id" which is the primary key of both the tables (F1 and F2).
Is there a syntax error..?
Also if that query could be written properly does that work faster than writing three separate queries. Asking because the tables F1 and F2 are both quite big (600K records).
UPDATE F2 set F2.t1= F1.t1 where F2.id = F1.id;
UPDATE F2 set F2.t2= F1.t2 where F2.id = F1.id;
UPDATE F2 set F2.t3= F1.t3 where F2.id = F1.id;
SET F2.t1= (SELECT t1 FROM F1),
SET F2.t2= (SELECT t2 FROM F1),
SET F2.t3= (SELECT t3 FROM F1)
WHERE F2.id = F1.id;