Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*declare v_max_id employees.employee_id%type;
- begin
- select max(employee_id)+1 into v_max_id
- from employees;
- dbms_output.put_line(v_max_id);
- insert into employees(employee_id, last_name, email, hire_date, job_id)
- values (v_max_id, 'Kowalski', 'kowal1@op.pl', to_date('04-04-2014', 'dd-mm-yyyy'), 'IT_PROG');
- */
- declare v_dolna employees.salary%type:=&dolna;
- v_gorna employees.salary%type:=&gorna;
- v_id_od employees.department_id%type:=50;
- cursor kursor is select first_name, last_name, salary
- from employees
- where department_id = v_id_od;
- begin
- for rekord in kursor loop
- if rekord.salary between v_dolna and v_gorna then
- dbms_output.put_line(rekord.first_name ||' '|| rekord.last_name);
- end if;
- end loop;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement