This content has been marked as final. Show 3 replies
This information is available in the manual.
declare variable1 number; variable2 number; begin execute immediate ' select 1,2 from dual ' into variable1, variable2; end;
I can able to get the data. But, if select statment not writting any records it's throwing as ORA-01403: no data found.
How can i handle this issue ?
Put an exception block around it:1 person found this helpful
Have a look at the FAQ on exception handling: There are excellent examples there.
declare variable1 number := 5; variable2 number := 10; begin execute immediate ' select 1,2 from dual ' into variable1, variable2; exception when no_data_found then null; -- do something appropriate here end;