Hi,
I was wondering the usage of sql%found in explicit cursor. Does the following not work?
Declare
cursor c1
is
select employee_name from employees where id = 10;
v_employee_name varchar2(100);
v_row_found BOOLEAN DEFAULT FALSE;
begin
open c1;
fetch c1 into v_employee_name;
v_row_found := SQL%FOUND;
close c1;
if v_row_found then
dbms_output.put_line('row found');
else
dbms_output.put_line('row not found');
end if;
end;
Employee with id 10 exists in the system, but output is "row not found". I worked fine sometime back. Is behavior of SQL%FOUND not always the same?
please advice.
thanks
kumar