Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Update question
This is how you do it.
update table1
set column1=(select feature from table2, table3 where table2.column2=table3.column2 and table1.column1 = table3.column2) where exists (select '1' from table2, table3 where table1.column1 = table2.column2 and table1.column1 = table3.column2);
You must use the double where clause if you you don't want to update every row of table1.
Regards
/Joachim
Linda K. Johnson wrote:
> Is there a way to update one table with selected fields from another
> table? The only way we see (and it doesn't work) requires trying to
> return more than one row to the set statement.
>
> i.e.
> update table1
> set column1=(select feature from table2, table3
> where table2.column2=table3.column2)
>
> It returns too many rows to the update. Thanks for any help.
>
> Please send any responses to pacosta_at_lctx.com or the newsgroup.
>
> Thanks again,
>
> Paul Acosta
Received on Wed Jun 10 1998 - 07:32:50 CDT
![]() |
![]() |