Cardinality function
The CARDINALITY function counts the number
of elements that a collection contains. You can use the CARDINALITY function
with simple or nested collections. Any duplicates in a collection
are counted as individual elements. The following query shows a query
that returns, for every row in the manager table, department values and the number of elements in
each direct_reports collection.
You can also evaluate the number of elements in a collection from
within a predicate expression, as the following query shows.