Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to update multiple rows having WHERE clause?
On Fri, 10 Sep 1999 20:08:03 GMT, bkrishnaiyer_at_refco.com
wrote:
>Ex: I want to set cololumn1 values of table1 with column1 values of
>table2.
If I understand what you want correctly, you should be able to do something like this:
update table1
set table1.column1 = ( select table2.column1 from table2 where table2.primarykey=table1.primarykey);
The subquery will be executed once for each row in table1 that you update.
Jonathan
![]() |
![]() |