Pages

Ads 468x60px

Sunday, 3 June 2012

PL SQL Program For using Cursor.


PL SQL Program For using Cursor. 


declare
cursor c is select name,job,salary from employee; 
empname employee.name%type;
jobs employee.job%type;
sal employee.salary%type;


begin 
open c; 
dbms_output.put_line(' NAME DESIGNATION SALARY');
loop 
fetch c into empname,jobs,sal;
exit when c%notfound;
dbms_output.put_line(empname||' '||jobs||' '||sal);
end loop;
close c;
end;

0 comments:

Post a Comment

Total Pageviews