CARDINALITY is an advanced function that the Oracle database supports. It is used to get the number of elements in a nested table. The CARDINALITY function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g and Oracle 10g.
CARDINALITY( column )
column: It is used to specify the column in the nested table whose cardinality needs to be returned.
select id, CARDINALITY (marks) from students;
Here, the cardinality will be returned for the ‘marks’ column in the ‘students’ table.