Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how can I write cursor which tell me no record exists

850695Feb 16 2012 — edited Feb 16 2012
Hi Experts,

I want to know how can I write a cursor which told me no record exists before opening and running the loop.
So I want that if no record exist then I dont want to run loop and open the cursor.

Example: cursor c1 is select empno from scott.emp where empno=10


In procedure body, I want to check if there is no record against my cusor then I don't like to open it.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2012
Added on Feb 16 2012
7 comments
1,477 views