In Oracle/PLSQL, the cardinality function returns the number of elements in a nested table.
Syntax
The syntax for the cardinality function is:
cardinality( nested table column )
nested table column is the column in the nested table that you wish to return the cardinality for.
Note
If the nested table is empty, the cardinality function will return NULL.
If the nested table is a null collection, the cardinality function will return NULL.
Applies To
- Oracle 11g, Oracle 10g
For Example
select supplier_id, cardinality(location)
from suppliers;