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
What does an inner join do?
What are the different types of tables in sql?
How can you get sql*loader to commit only at the end of the load file? : aql loader
Is subquery faster than join?
What is trigger and types?
Which is better cte or subquery?
How do I find duplicates in sql?
What is user defined functions?
State few characteristics of pl/sql?
How do I count rows in sql?
What are the rules to be applied to nulls whilst doing comparisons?
What is string join?
When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?
what are set operators in sql? : Sql dba
Can we enter data in a table in design view?