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

What is synchronized subquery?

583


when MSQL8.0 is in market

1589


What is range partitioning?

508


Is sql developer case sensitive?

510


Explain what is table in a database?

568






Why stored procedure is faster than query?

510


How many joins can you have in sql?

502


How we can create a table in pl/sql block. Insert records into it? Is it possible by some procedure or function? Please give example?

584


How many primary keys can a table have?

525


define sql delete statement ? : Sql dba

542


Is left join inner or outer?

575


What is $$ in sql?

541


Explain the working of foreign key?

537


In what condition is it good to disable a trigger?

544


What is mutating error in pl sql?

536