Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: sql%found problem
Select count statement always returns a number whether there exists rows in the table or not.
If there are no rows the outcome is 1 row with count as 0. If there are some rows in the table output is 1 row with count of Number of rows. As always there is a row returned SQl %found is always TRUE So as per ur logic, it will always go to YES part...
Saji
From: pjohnpeter_at_qssnet.com on 18/07/2000 01:44
Please respond to ORACLE-L_at_fatcity.com
To: ORACLE-L_at_fatcity.com
cc:
Subject: sql%found problem
hi all,
i had a problem over this query.could u tell me what is wrong in that query.
dbms_output.put_line('yes '||v); else dbms_output.put_line('no '||v); end if; end;