Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Checking if more than 0 rows exist.
Interesting that no one mentioned the exists clause. This is exactly
what an exists subquery is for: test to see if some condition is true
and by design the statements stops processing as soon as one hit is
found.
If you use pl/sql and choose logic like Frank posted since the cursor is populated by the OPEN and not by the FETCH statement, which returns a row to the client, be sure to use "and rownum = 1" to limit the work performed by the cursor.
HTH -- Mark D Powell -- Received on Mon May 09 2005 - 18:07:50 CDT
![]() |
![]() |