Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 does an inner join do?

1183


What are the different types of tables in sql?

1009


How can you get sql*loader to commit only at the end of the load file? : aql loader

1014


Is subquery faster than join?

1014


What is trigger and types?

1026


Which is better cte or subquery?

1028


How do I find duplicates in sql?

930


What is user defined functions?

984


State few characteristics of pl/sql?

971


How do I count rows in sql?

1007


What are the rules to be applied to nulls whilst doing comparisons?

1323


What is string join?

979


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

1117


what are set operators in sql? : Sql dba

1055


Can we enter data in a table in design view?

969