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






You use the POWERMULTISET operator to get a sub-nested table from an input nested table. The following query illustrates the use of POWERMULTISET:

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

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

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

15 rows selected.

SQL>
SQL> drop type nestedTableType;

You cannot use POWERMULTISET in PL/SQL.








26.15.POWERMULTISET
26.15.1.POWERMULTISET Operator