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

Home -> Community -> Usenet -> c.d.o.misc -> Re: 2 Dumb newbee questions

Re: 2 Dumb newbee questions

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 20 Jul 2004 08:42:11 -0500
Message-ID: <u3c3mu7b9.fsf@standardandpoors.com>


On Tue, 20 Jul 2004, matthiasUNDERSCOREweiss_at_gmx.at wrote:
> Galen Boyer wrote:

>> Let me turn it around on you.  How would you describe what the
>> update should look like?

>
> Hm, probably something like this:
>
>
> update foo
> set ( col_1, col_2 ) = ( select i.col_3, ck.col_5
> from foo i, bar ck
>   where i.col_1 = ck.col_1
>      and  i.col_2 = ck.col_2
> );
>
>
> Has my version any disatvantage?

Using yours, I would have to implicitly trust that the outer foo being updated is the same foo in the join because I wasn't allowed to code that relationship anywhere. Oracle's syntax makes that relationship explicit.

-- 
Galen Boyer
Received on Tue Jul 20 2004 - 08:42:11 CDT

Original text of this message

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