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 / kavitha nedigunta

yes this will give error,
1.need to include the into clause.
(PLS-00428: an INTO clause is expected in this SELECT
statement)
2.as in exception block when others
should be at the bottom of the exception block.
(PLS-00370: OTHERS handler must be last among the exception
handlers of a block)

Is This Answer Correct ?    20 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you load data into multiple tables at once? : aql loader

802


What is rowid in sql?

678


What is cross join sql?

684


What is inner join in sql?

775


What is offset and limit in sql?

744






Is t sql a programming language?

761


how to increment dates by 1 in mysql? : Sql dba

728


What is int identity in sql?

760


What type of database is cloud sql?

780


What problem one might face while writing log information to a data-base table in pl/sql?

763


What is a sql schema used for?

729


What does select * from mean in sql?

2547


What if we write return in procedure?

976


What is sql profiling in oracle?

739


What is field delimiter?

793