Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Update table with contents from another table
Hi,
The way to update a table with contents from another is always shown
like this:
Update T_A
Set C1 = (Select C2 from T_B where ...)
Now, if I need to update 4 columns in T_A, am I supposed to create 4 subqueries? Sounds like inefficient to me...
This is what I'm doing but not sure if there's a better way:
Update (Select T_A.C1, T_A.C2 ..., T_B.C2, T_B.C3
FROM T_A, T_B WHERE ...)
Am I doing it right? Any ideas/suggestions?
Thanks,
David Received on Thu Jul 08 2004 - 14:02:48 CDT