User Tools

Site Tools


kurs:index_by_scalar
PROCEDURE PC_INDEXBY_SCALAR
    (v_name IN varchar2)
   IS
    TYPE emp_name_table_type IS table of
        employees%ROWTYPE
    index by binary_integer;
    emp_name_table emp_name_table_type;
    v_ind number(30);
BEGIN
    select employee_id into v_ind from employees
        where last_name = v_name;

    emp_name_table(v_ind).last_name:=v_name;

    IF emp_name_table.EXISTS(v_ind) THEN
        dbms_output.put_line(emp_name_table(v_ind).last_name||' '||v_ind);
    end if;
END; -- Procedure
kurs/index_by_scalar.txt · Last modified: 2014/09/10 21:22 (external edit)