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!

SQL%ROWCOUNT=0 OR NO_DATA_FOUND EXCEPTION ?

Data BoyJul 11 2008 — edited Jul 11 2008
If my Query is Not Returning any Data i want to Initialize a variable with 1

v_var :=1

i am getting same results for

IF SQL%ROWCOUNT=0 THEN
v_var:=1 ;
END IF;

EXCEPTION WHEN NO_DATA_FOUND THEN
v_var:=1;
END;

which is preferrable among these ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2008
Added on Jul 11 2008
5 comments
11,649 views