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


Please Help Members By Posting Answers For Below Questions

Why do we need unique key in a table?

515


What do you mean by dbms? What are its different types?

546


what is the difference between $message and $$message? : Sql dba

536


Does postgresql run on the cloud?

578


how to show all tables with 'mysql'? : Sql dba

593






Cite the differences between execution of triggers and stored procedures?

601


Can we use the cursor's to create the collection in PL/SQL?

507


what is the command used to fetch first 5 characters of the string? : Sql dba

1122


Can cursors be part of a trigger body?

1097


Does truncate release storage space?

546


What is input buffer in sql*plus?

629


what is 'trigger' in sql? : Sql dba

545


How to display the records between two range in Oracle SQL Plus?

631


Explain the savepoint statement.

586


Why do we use triggers?

506