I have a small PL/SQL Block
assume in this way
begin
select * from emp where empno=100;
exception
when others then
<Some Messages>
when no_data_found then
<Some Messages>
when too_many_rows then
<Some Messages>
end;
The question which he asked was whether this block will get
executed normally or it will throw error ?
If errored out then what is the reason for the error ?
Could anybody please help me ?
Regards
Nakul Venkataraman
Answer Posted / virendra
yes this will give error, as in exception block when others
should be at the bottom of the exception block.
ex.
exception
when no_data_found then
<Some Messages>
when too_many_rows then
<Some Messages>
when others then
<Some Messages>
end;
Is This Answer Correct ? | 19 Yes | 3 No |
Post New Answer View All Answers
Why do we need unique key in a table?
What do you mean by dbms? What are its different types?
what is the difference between $message and $$message? : Sql dba
Does postgresql run on the cloud?
how to show all tables with 'mysql'? : Sql dba
Cite the differences between execution of triggers and stored procedures?
Can we use the cursor's to create the collection in PL/SQL?
what is the command used to fetch first 5 characters of the string? : Sql dba
Can cursors be part of a trigger body?
Does truncate release storage space?
What is input buffer in sql*plus?
what is 'trigger' in sql? : Sql dba
How to display the records between two range in Oracle SQL Plus?
Explain the savepoint statement.
Why do we use triggers?