Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Can you specify multiple tables in update's where clause?

Re: Can you specify multiple tables in update's where clause?

From: Christopher Latta <nobody_at_nowhere.not>
Date: Thu, 24 May 2001 14:56:16 +1000
Message-ID: <yy0P6.3295$Ld4.145056@ozemail.com.au>

Try nested queries:

(untested SQL ahead)
UPDATE TABLE_A
  SET TABLE_A.my_col = "thisThat"
  WHERE
    TABLE_A.col_a = (select col_b from TABLE_X where col_b = TABLE_A.col_a and col_c = (select col_d from TABLE_Y where TABLE_X.col_c = col_d))

Christopher Latta

change <changeme_at_changeme> wrote in message news:9ei2f5$dh01_at_kcweb01.netnews.att.com...
> Need some sql expert input on UPDATE command. How do I involve multiple
> tables in WHERE clause?
>
> Consider this simplified example on update command:
>
> UPDATE TABLE_A
> SET TABLE_A.my_col = "thisThat"
> WHERE
> TABLE_A.col_a = TABLE_X.col_b
> and TABLE_X.col_c = TABLE_Y.col_d
Received on Wed May 23 2001 - 23:56:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US