Comparing cursor with null [message #331466] |
Thu, 03 July 2008 08:53  |
me_arindam
Messages: 26 Registered: March 2008 Location: India
|
Junior Member |
|
|
Hi,
I have a cursor like,
cuesor c1 is select * from emp;
and a variable like,
v emp%rowtype;
Now I want to see whether the cursor is null or not?
I have tried with if c1 is null--> got error
I have tried after opening and fetching the cursor into v,
if v is null then---> also got error.
Please tell me how can I compare the cursor with null value?
Thanks,
Arindam
|
|
|
|
|
|
Re: Comparing cursor with null [message #331473 is a reply to message #331466] |
Thu, 03 July 2008 09:11  |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
A cursor cannot be null - a cursor is a thing that you fetch data f
from.
You cannot know the number of rows that a cursor will return until you've fetched the last row (unless you include some sort of COUNT function as one of the columns - not recommended).
|
|
|