Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Checking if more than 0 rows exist.
In article <d5og57$je0$1_at_news3.zwoll1.ov.home.nl>, Frank van Bortel
says...
> > Select count(*) from combo_table where all fields match would count them all
> > but all I really need to know is if any exist (>0 rows).
> >
>
> Right question: define a cursor with all 5 columns concerned.
> Open the cursor - (attempt to) fetch any record.
> If found, you're OK - close cursor, 1 read done.
> If not found, you're OK - close cursor, 1 read done.
>
>
Do you think this is a better approach than using EXISTS as suggested (and proved to be faster) by Phil?
-- jeremyReceived on Tue May 10 2005 - 02:43:54 CDT