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

How is data stored on a disk?

726


Is record in pl sql?

677


What is Materialized View? In What Scenario we Use Materialized View?

8941


How do you remove duplicates without using distinct in sql?

696


How to fix oracle error ora-00942: table or view does not exist

767






Which is the correct statement about truncate and delete?

758


what is the difference between clustered and non clustered index in sql? : Sql dba

737


Can we rollback truncate?

721


What is the command used to fetch the first 5 characters of a string?

929


What are different types of statements supported by sql?

821


How do you declare a user-defined exception?

718


What is a mutating table and a constraining table?

758


How many aggregate functions are available there in sql?

701


What is function and procedure in pl sql?

704


Are left and right joins the same?

720