The exception is no_data_found. Here is an example :
Code:
declare
v_item number;
begin
select item into v_item from orddtls where order_no=4476;
exception
when no_data_found then
dbms_output.put_line('no data found');
end;
/
Quote:
Originally posted by feign3
How can I raise an exception when no rows are selected from a query? Does "no rows selected" have an error code associated with it?
|