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 / sdp
Yes , it will give an error as for single row queries we
need to include the into clause also
the query would be
declare
v_emp emp%rowtype%;
begin
select * into v_emp from emp where empno=100;
exception
---
---
end;
| Is This Answer Correct ? | 5 Yes | 8 No |
Post New Answer View All Answers
What are the most important ddl statements in sql?
how to include comments in sql statements? : Sql dba
Is sql a backend?
what are the performance and scalability characteristics of mysql? : Sql dba
Is coalesce faster than isnull?
What do you mean by stored procedures?
What is vector point function?
what are the join types in tsql? : Transact sql
What is sql mysql pl sql oracle?
What do you mean by dbms? What are its different types?
Can we create index on primary key?
What are sql*plus environment variables?
what is the difference between ereg_replace() and eregi_replace()? : Sql dba
Which language is used in sql?
What are the types of operators available in sql?