Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare
- v_lname hr.employees.last_name%type;
- v_salary hr.employees.salary%type;
- v_bonus number;
- v_counter number:=100;
- begin
- loop
- select last_name, salary into v_lname, v_salary from hr. employees where employee_id = v_counter;
- if v_salary > 15000 then
- dbms_output.put_line('Last Name : ' || v_lname|| ' salary : '||v_salary||' bonus : '||0.1*v_salary);
- else
- dbms_output.put_line('Last Name : ' || v_lname|| ' salary : '||v_salary||' bonus : '||0.15*v_salary);
- end if;
- v_counter := v_counter +1;
- if v_counter >150 then
- exit;
- end if;
- end loop;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement