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: update based on join

Re: update based on join

From: Grzegorz Dryl <Grzegorz.Dryl_at_crt.tpsa.pl>
Date: Mon, 2 Oct 2000 07:59:39 +0100
Message-ID: <8r9821$6t5$1@news.tpi.pl>

> Here's the example and the SQL is used. Is there a better way to do the
 same
> thing?

> SQL>
> update girls z set bra = 'C' where (select a.name from boys a, girls b
 where
> b.name = z.name and a.name = b.friend)='James';
>
> The update changes the bra size for all girls with 'James' as a friend.

update girls z set bra = 'C' where exists (

    select a.name
    from boys a, girls b
    where b.name = z.name and a.name = b.friend and a.name ='James' ); Received on Mon Oct 02 2000 - 01:59:39 CDT

Original text of this message

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