EQL provides a number of row functions for working with sets.
The set row functions can be used anywhere that an arbitrary expression can be used. For example, they can be used in SELECT clauses, clauses, WHEREORDER BY clauses, and so on.
ADD_ELEMENT row function adds an element to a set.CARDINALITY row function takes a set and returns the number of elements in that set.COUNTDISTINCTMEMBERS function counts the number of elements in a set that has the union of all its values.DIFFERENCE row function takes two sets of the same data type and returns a set containing all of the elements of the first set that do not appear in the second set.FOREACH function performs a computation on every member of a set or sets and assembles the results into a set.INTERSECTION row function takes two sets of the same data type and returns a set that is the intersection of both input sets.IS_EMPTY and IS_NOT_EMPTY functions determine whether a set is or is not empty. The IS EMPTY and IS NOT EMPTY functions provide alternative syntaxes for these functions.IS_MEMBER_OF row function takes an atomic value and a set, and returns a Boolean indicating whether the atomic value occurs in the set.SINGLETON function takes a single atomic value and returns a set containing only that value.SUBSET row function takes two sets of the same data type and returns a Boolean true if (and only if) the second set is a subset of the first set.TRUNCATE_SET row function takes a set and an integer, and returns a copy of the set with no more than the specified number of elements in it.UNION row function takes two sets of the same data type and returns a set that is the union of both input sets.