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
Why is stored procedure faster than query?
Why is sql better than hql?
What is java sql package?
Can dml statements be used in pl/sql?
Why are indexes and views important to an organization?
how can we find the number of rows in a table using mysql? : Sql dba
what is self-join? : Sql dba
What is multiple partition?
How do you remove duplicate records from a table?
What are different types of queries in sql?
What is a system versioned table?
What is the difference between the sql*loader and import utilities? : aql loader
What is the current version of sql?
What is the purpose of my sql?
What is orm in sql?