CARDINALITY table collection : CARDINALITY « Collections « Oracle PL/SQL Tutorial






SQL> CREATE OR REPLACE PROCEDURE cardinality_example AS
  2    TYPE charTable IS TABLE OF VARCHAR2(10);
  3    emp1 charTable;
  4    cardinality_var INTEGER;
  5  BEGIN
  6    emp1 := charTable('A', 'B', 'C');
  7    cardinality_var := CARDINALITY(emp1);
  8    DBMS_OUTPUT.PUT_LINE('cardinality_var = ' || cardinality_var);
  9  END cardinality_example;
 10  /

Procedure created.

SQL>








26.10.CARDINALITY
26.10.1.CARDINALITY Operator
26.10.2.CARDINALITY operator lets count the elements in a collection.
26.10.3.CARDINALITY table collection