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 / 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


Please Help Members By Posting Answers For Below Questions

What are the most important ddl statements in sql?

1114


how to include comments in sql statements? : Sql dba

953


Is sql a backend?

1020


what are the performance and scalability characteristics of mysql? : Sql dba

996


Is coalesce faster than isnull?

966


What do you mean by stored procedures?

1012


What is vector point function?

1052


what are the join types in tsql? : Transact sql

1064


What is sql mysql pl sql oracle?

1070


What do you mean by dbms? What are its different types?

1018


Can we create index on primary key?

966


What are sql*plus environment variables?

1093


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

1150


Which language is used in sql?

1057


What are the types of operators available in sql?

1060