Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: update based on join
> 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
![]() |
![]() |