| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: any bright ideas
socgen-crosby wrote:
>
> there are three tables x,y and z
> I am trying to achieve following in one update statement
> update z
> set z.a ='O'
> where
> (select count(*) from x) = (select count(*) from y);
>
> I know above sql statement is syntactically wrong but
> is there any way of achieving this in single sql statement
> (without using any explicit cursors)?
What about this :
update z
set z.x = ( select c1.anz - c2.anz
from ( select count(*) anz from standort ) c1 ,
( select count(*) anz from standort ) c2
);
I hope its worth reading.
Ciao. Robo. Received on Fri Apr 18 1997 - 00:00:00 CDT
![]() |
![]() |