Reputation: 514
I am working with stored procedure for the first time and I have a stored proc which does some checking to set a SYS_REFCURSOR as NULL.
create or replace PROCEDURE "proc"
(
tableRec OUT SYS_REFCURSOR
)
.
.
BEGIN
.
.
EXCEPTION
WHEN NO_DATA_FOUND THEN
tableRec := NULL;
END;
Once this is run, I need to check if tableRec was null or not before running another if loop. I tried as below
BEGIN
if tableRec = NULL then
but this doesnt work. Elsewhere this is possible to check if a number say itemCount, is 0 by writing
if itemCount = 0 then
Can anyone explain how to achieve this for SYS_REFCURSOR and why it works for number and not for it. It is not about checking if the SYS_REFCURSOR is empty(because I found information about it on internet) or not but make use of the fact that is it set as NULL
Upvotes: 0
Views: 576