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
Are stored procedures faster than dynamic sql?
What is schema in sql?
how is myisam table stored? : Sql dba
How do you remove duplicates without using distinct in sql?
When is the update_statistics command used?
how to calculate the difference between two dates? : Sql dba
What is the use of stored procedures?
What is trigger with example?
What is %rowtype in pl sql?
What are different types of sql?
Is inner join faster than left join?
Can we join two tables without common column?
What is character functions?
What are secondary keys?
What are instead of triggers?