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
Can we use views in stored procedure?
Why coalesce is used in sql?
What is informix sql?
How you improve the performance of sql*loader? : aql loader
Can we join 3 tables in sql?
What is difference between table and view?
Could you please provide oca (oracle 10g) dumps for my certification ?
What are the features of pl sql?
How do I partition in sql?
Explain the rollback statement?
How do I access sql anywhere database?
What are the different schemas objects that can be created using pl/sql?
List and explain the different types of join clauses supported in ansi-standard sql?
What is procedure and function?
What are all the different types of indexes?