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 many tables can a sql database have?

533


How do I find duplicates in sql?

509


What is a primary key sql?

565


Show the cursor attributes of pl/sql.

614


Which nosql database is best?

515






What is benefit of creating memory optimized table?

542


What is a left join?

513


How do you sort in sql?

606


Why we use join in sql?

533


Does group by remove duplicates?

553


How to change sql*plus system settings?

544


What do you know by pl/sql cursors?

570


What is the purpose of the partition table?

546


What is percent sign in sql?

721


What is %type in sql?

518