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 is the command used to fetch first 5 characters of the string?
What happens when a trigger is associated to a view?
What is a full join sql?
How to execute a stored procedure?
What is meant by cursor in sql?
How is a process of pl/sql compiled?
Are there any features that are decommissioned in 11g that are not present in 11g?
What is type and rowtype in pl sql?
What is difference between ms sql and mysql?
how do you login to mysql using unix shell? : Sql dba
Is vs as in pl sql?
what is the difference between join and union? : Sql dba
what is offset-fetch filter in tsql? : Transact sql
can sql servers linked to other servers like oracle? : Sql dba
what is a unique key ? : Sql dba