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

Use The Implicit cursor to Query The Department table information Where Deptno is 30.check,if no record was found then print "Record Was Not Found".Else Print Deptname And Ename.Dept table Have Dname Varchar2(20),Deptno Number,EnameVarchar2(20).Please Answer In 2 mins,with in Maximum 15 lines.

Answer Posted / vikas gupta

Declare
l_deptname dept.deptname%Type;
l_ename dept.ename%type;
Begin
select deptname,ename
into l_deptname,l_ename
from dept
where dept_no = 30;

if sql%notfound then
dbms_output.put_line("Record was not Found")
else
dbms_output.put_line("Deptname=" l_deptname);
dbms_output.put_line("Ename=" l_ename);
end if;

end;

Is This Answer Correct ?    10 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is sql between inclusive?

1064


Define implicit and explicit cursors.

1076


how to use like conditions? : Sql dba

1040


What is pl sql collection?

921


What is the difference between inner join and outer join?

931


Name the operator which is used in the query for pattern matching?

894


give the syntax of grant and revoke commands? : Sql dba

1090


What is pl sql code?

995


How to revise and re-run the last sql command?

1101


What is sql profiler in oracle?

1015


Why use triggers in sql?

897


What is a mutating table and a constraining table?

1038


Does group by remove duplicates?

983


What is output spooling in sql*plus?

986


What are the topics in pl sql?

932