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

Home -> Community -> Usenet -> c.d.o.server -> Re: PLSQL/ UPDATE statement

Re: PLSQL/ UPDATE statement

From: Phil Preen <obiwan-preen_at_maytheforcebewithyou.co.uk>
Date: Wed, 12 Jan 2000 14:49:42 -0000
Message-ID: <947688753.220092@red.parallax.co.uk>

Kevin Burton <pdsinc_at_compuserve.com> wrote in message news:85i01a$m7o$1_at_ssauraac-i-1.production.compuserve.com...
> In Sybase I have the ability to update columns in a table A by joining
> to another table B. The syntax is'
>
> UPDATE Table 1
> set table1.col1 = Table2.col1,
> table1.col2 = Table2.col3
> WHERE table1.col3 = Table2.col2;
>

UPDATE Table1 SET (col1, col2)
= (SELECT Table2.col1,Table2.col3 FROM Table2

    WHERE table1.col3 = Table2.col2);

Phil. Received on Wed Jan 12 2000 - 08:49:42 CST

Original text of this message

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