Exception too many rows...
Hi
I am getting two different outputs with following code depending upon i declare the variable in first or second way...
when i declare the variable v_empno as number(10) and too many rows exception is raised....and after that i dbms this variable..it is null...
but when i declare the same variable as table.column%type....and the similar scenario happens and i dbms the value of variable...it is not null...rather the first value from output of the query...
declare
--v_empno number(10);
v_empno emp.empno%type;
begin
dbms_output.put_line('before '||v_empno );
select empno into v_empno from emp;
dbms_output.put_line('first '||v_empno);
exception when too_many_rows then
dbms_output.put_line('second '||v_empno);
dbms_output.put_line('exception'||sqlerrm);
end;
is there any specific reason for this....
ur comments plz
Thanks
Sidhu