typeprob

typeprob - type rec is record(ename emp.ename%type) data...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 create type myrecord as object(ename varchar2(10),esal number(7,2)) declare dat myrecord cursor c1 is select ename,sal,deptno from emp begin dat:=myrecord('gh',100) open c1 fetch c1 into dat loop dbms_output.put_line(c1%ROWCOUNT ||' EmpName ' ||dat.ename ||' sal ' ||dat.sal ) fetch c1 into dat exit when c1%NOTFOUND end loop close c1 end ||' Salary: ' || dat.esal declare dat myrecord
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: type rec is record(ename emp.ename%type) data rec begin data.ename:='gg'--dat.ename:='lll' end declare dat integer cursor c1 is select ename,sal,deptno from emp begin for dat in c1 loop dbms_output.put_line(c1%ROWCOUNT ||' EmpName: ' || dat.ename ||' Salary: ' || dat.sal) end loop end--type tab is table of myrecord indexed by binary_integer...
View Full Document

Ask a homework question - tutors are online