SUBMULTISET Operator : SUBMULTISET « Collections « Oracle PL/SQL Tutorial






SUBMULTISET operator checks whether the contents of one nested table are a subset of another nested table.

SQL>
SQL> CREATE OR REPLACE PROCEDURE submultiset_example AS
  2    TYPE nestedTableType IS TABLE OF VARCHAR2(10);
  3    myTable1 nestedTableType;
  4    myTable2 nestedTableType;
  5    myTable3 nestedTableType;
  6    result BOOLEAN;
  7  BEGIN
  8    myTable1 := nestedTableType('A', 'G', 'S');
  9    myTable2 := nestedTableType('B', 'F', 'S');
 10
 11    result :=
 12      myTable1 SUBMULTISET OF myTable2;
 13    IF result THEN
 14      DBMS_OUTPUT.PUT_LINE('myTable1 subset of myTable2');
 15    END IF;
 16  END submultiset_example;
 17  /

Procedure created.

SQL> CALL submultiset_example();

Call completed.

SQL>
SQL>








26.13.SUBMULTISET
26.13.1.SUBMULTISET Operator
26.13.2.SUBMULTISET operator checks whether a VARRAY or NESTED TABLE collection is a subset of a mirrored datatype
26.13.3.SUBMULTISET table collection
26.13.4.SUBMULTISET: is it a sub set