Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare
- deptno number(3) :=50;
- jami number(10):=0;
- c_salary employees.salary%type;
- c_pct EMPLOYEES.COMMISSION_PCT%type;
- cursor cur is select salary,commission_pct
- from employees
- where department_id=deptno;
- begin
- open cur;
- loop
- fetch cur into c_salary,c_pct;
- jami :=jami + ( c_salary + c_salary*nvl(c_pct,0) ) *12 ;
- exit when cur%notfound;
- end loop;
- dbms_output.put_line('50 departamentis xelfasia(komisiis chatvlit)' || jami);
- close cur;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement