Home Privacy Policy Feedback Link to us Site Map Forums

Oracle/PLSQL: Cardinality Function


In Oracle/PLSQL, the cardinality function returns the number of elements in a nested table.

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 10g, Oracle 11g

For example:

select supplier_id, cardinality(location)
from suppliers;