Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. declare
  2. v_lname hr.employees.last_name%type;
  3. v_salary hr.employees.salary%type;
  4. v_bonus number;
  5. v_counter number:=100;
  6.  
  7. begin
  8. loop
  9. select last_name, salary into v_lname, v_salary from hr. employees where employee_id = v_counter;
  10. if v_salary > 15000 then
  11. dbms_output.put_line('Last Name : ' || v_lname|| ' salary : '||v_salary||' bonus : '||0.1*v_salary);
  12. else
  13. dbms_output.put_line('Last Name : ' || v_lname|| ' salary : '||v_salary||' bonus : '||0.15*v_salary);
  14. end if;
  15. v_counter := v_counter +1;
  16. if v_counter >150 then
  17. exit;
  18. end if;
  19. end loop;
  20. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement