NOT IN example (table collection) : IN « Collections « Oracle PL/SQL Tutorial






SQL> CREATE OR REPLACE PROCEDURE in_example AS
  2    TYPE charTable IS TABLE OF VARCHAR2(10);
  3    emp1 charTable;
  4    emp2 charTable;
  5    emp3 charTable;
  6    result BOOLEAN;
  7  BEGIN
  8    emp1 := charTable('A', 'B', 'C');
  9    emp2 := charTable('C', 'D', 'E');
 10    emp3 := charTable('A', 'B', 'C');
 11
 12
 13
 14    result := emp3 NOT IN (emp2);
 15    IF result THEN
 16      DBMS_OUTPUT.PUT_LINE('emp3 not in emp2');
 17    END IF;
 18  END in_example;
 19  /

Procedure created.

SQL>








26.17.IN
26.17.1.IN and NOT IN Operators
26.17.2.NOT IN example (table collection)