Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Checking if more than 0 rows exist.
Jeremy wrote:
> 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. >> >>
One thing's for sure. A cursor is almost never the correct solution to anything in Oracle unless using a version more than 5 years old.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Tue May 10 2005 - 10:07:57 CDT