SUBMULTISET
SUBMULTISET is a SQL operator used to validate whether a nested table is a sub-multiset of another nested table. This implies that all elements of the first nested table are available in the second nested table, and the frequency of each element in the first one does not exceed its frequency in the second one. This operator can be used in a WHERE clause to filter rows based on nested table contents. The returned result is either true or false.
Example
Output
Explanation
The SUBMULTISET function is used to determine if one nested table is a subset of another. In the above example, m
is not a submultiset of n
because m
contains elements 6 and 7 which are not in n
. The output confirms this, showing m is not a submultiset of n
.