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