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

declare
cursor mycursor is
select dname,ename from emp ,dept where emp.deptno=dept.deptno and dept.deptno=30;
v_dname dept.dname%type;
v_ename emp.ename%type;
begin
open mycursor;
loop
exit when mycursor%notfound;
fetch mycursor into v_dname,v_ename;
exception
when no_data_found then
dbms_output.put_line(v_dname||' '||v_ename);
end loop;
close mycursor;
end;

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I save the results of sql query in a file?

925


What does stand for in sql?

915


how to load data files into tables with 'mysqlimport'? : Sql dba

1031


Why do we use sql constraints?

1122


Is pl sql and postgresql same?

1052


Is sql sequential or random?

980


What is the use of procedures?

923


Why plvtab is considered as the easiest way to access the pl/sql table?

1127


Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?

990


Where the sql database files are stored?

951


What is the advantage of index in sql?

914


How many types of keys are there in sql?

985


Explain scalar functions in sql?

1014


What is error ora-12154: tns:could not resolve the connect identifier specified?

1013


Why commit is not used in triggers?

987