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

Is foreign key mandatory?

1058


Explain what is a column in a table?

1153


What information is needed to connect sql*plus an oracle server?

1074


what is uncommittable transactions? : Transact sql

1032


What is the maximum number of rows in sql table?

1067


Explain the savepoint statement.

1134


What is prepared statement in sql?

1098


In pl/sql, what is bulk binding, and when/how would it help performance?

1030


Suppose a student column has two columns, name and marks. How to get name and marks of the top three students.

1075


Explain what is a database?

1129


when MSQL8.0 is in market

2137


What is type and rowtype in pl sql?

1054


What is the difference between python and sql?

1050


how does a local variable is defined using t-sql? : Transact sql

1054


What are the types of queries in sql?

1119