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






You use the POWERMULTISET_BY_CARDINALITY operator to get a sub-nested table from an input nested table with a specified length (cardinality).

SQL>
SQL> CREATE Or Replace TYPE nestedTableType IS TABLE OF VARCHAR2(10)
  2  /

SQL>
SQL> SELECT *
  2  FROM TABLE(POWERMULTISET_BY_CARDINALITY(nestedTableType('This', 'is', 'a', 'test'), 3));

COLUMN_VALUE
---------------------------------------
nestedTableType('This', 'is', 'a')
nestedTableType('This', 'is', 'test')
nestedTableType('This', 'a', 'test')
nestedTableType('is', 'a', 'test')

SQL>
SQL> drop type nestedTableType
  2  /
drop type nestedTableType

SQL>
SQL>You cannot use POWERMULTISET_BY_CARDINALITY in PL/SQL.








26.16.POWERMULTISET_BY_CARDINALITY
26.16.1.POWERMULTISET_BY_CARDINALITY Operator