1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
SQL> create or replace type tab_nr as table of number
2 /
Type crÚÚ.
SQL> declare
2 l_eno tab_nr;
3 l_ename emp.ename%Type;
4 begin
5 l_eno := tab_nr(7369, 7499, 7521, 7566, 7654, 7698, 7782, 7788, 7839, 7844, 7876);
6 --
7 For crs In (Select ename
8 from emp e, Table(l_eno) t
9 Where e.empno = t.column_value) Loop
10 --
11 dbms_output.put_line(crs.ename);
12 End Loop;
13 end;
14 /
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
ProcÚdure PL/SQL terminÚe avec succÞs. |
Partager