ORACLE EXCEPTION
I was writing a function today to return a specific value based on a where condition. I did have a exception block to caption any unwanted exception and return a value. But i was surprised to see that after Too many rows was raised it was still able to return a value.
Below is a test code that can be used to replicate
create table test_too_many_rows
(
val number
);
insert into test_too_many_rows values(1);
insert into test_too_many_rows values(2);
create or replace function get_too_many_values
return number
is
numVal number:=-999;
begin