User Tools

Site Tools


kurs:index_by_scalar

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:index_by_scalar [2014/09/10 21:22] (current)
Line 1: Line 1:
 +<​code>​
 +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
 +</​code>​
kurs/index_by_scalar.txt ยท Last modified: 2014/09/10 21:22 (external edit)