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: Select Statement

Re: Select Statement

From: steph <stephan0h_at_yahoo.de>
Date: 21 Apr 2006 08:25:15 -0700
Message-ID: <1145633115.153296.291390@i39g2000cwa.googlegroups.com>


sorry, my answer wasn't really informative ...

how about something like this pseudocode:

declare
  cursor c is
  select 1
  from yourtable
  where yourcondition
  ;
  dummy number;
begin
  open c;
  fetch c into dummy;
  if c%found then dosomething
  else dosomethingelse
  end if;
  close c;
end;

... this should only fetch one row.

an exists-query also comes to mind:

select 1
from dual
where exists
(
select null
from yourtable
where yourcondition
) Received on Fri Apr 21 2006 - 10:25:15 CDT

Original text of this message

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