Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Program No: 9 Aim: Program in PL/SQL block in Cursor to display List of Employees from Emp able!

Cursor to display List of Employees from Emp able: "NP# : declare cursor c is select * from emp; r c%rowtype; begin open c; dbms_output.put_line('empno loop fetch c into r; exit when c%notfound; dbms_output.put_line(r.empno ' ' r.ename ' ' r.job ' ' r.hiredate ' ' r.sal ' ' r.deptno); end loop; end; ename job r.hiredate sal deptno');

$ES#L : !"#$ set ser%eroutput on !"#$ &prg.s'l empno ()*+ (5++ (84(8** (*+2 ((43 ename smith allen ward jones bla,e scott job cler, r.hiredate sal deptno 43 )3 )3 43 )3 )3

-(./01.23 233

salesman 43.607.2- -*33 salesman 44.607.2- -483 manager 34.9:;.2- 4+(8 manager 3-.<9=.2- 4283 analyst -5.<9;.2- 4333

()48

ford

analyst

-8.>?@.2-

-233

43

:#A!"# procedure successfully completed.

You might also like