Re: Update on join, how?

From: <mlanda_at_vnet.ibm.com>
Date: 1996/11/08
Message-ID: <55vkkf$u4m_at_watnews1.watson.ibm.com>#1/1


In <55t5eg$54f_at_nntp1.u.washington.edu>, lesliet_at_u.washington.edu (L. Tseng) writes:
>Does anyone know how to do an update on join like in Sybase/MS SQL Server?
>
> update table_A
> set a.cola = 'x'
> FROM table_A a, table_B b
> where a.col = b.col
> and .......
>
>It seems to me Oracle does not support the 'FROM' in an update syntax?
>If yes, why is that? Thanks.
>

Try a sub-query. For example:

update table_A a
set a.cola = 'x'
where exists (select col

              from table_b
              where a.col=col and...)

 and ...
/

M.Landa Received on Fri Nov 08 1996 - 00:00:00 CET

Original text of this message