SQL> DECLARE
2 TYPE numberTabletype IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
3 myTable numberTabletype;
4 v_num NUMBER :=13;
5 BEGIN
6 myTable(1):=1001;
7
8 myTable(10):=1002;
9
10 myTable(-10):=1003;
11
12 myTable(v_num):=1004;
13
14 IF myTable.EXISTS(100) THEN
15 dbms_output.put_line(to_char(myTable(100)));
16 END IF;
17
18 END;
19 /
PL/SQL procedure successfully completed.
|