• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / Oracle / function / CARDINALITY Function in Oracle SQL – PLSQL

CARDINALITY Function in Oracle SQL – PLSQL

November 27, 2012 by techhoneyadmin

Oracle SQL / PLSQL CARDINALITY function is used to return the number of elements in a nested table.

Oracle SQL / PLSQL syntax for the CARDINALITY function is:

SELECT CARDINALITY (nested_column)
FROM table_name;

nested_column is the column in the nested table whose CARDINALITY we want to determine.

If nested table is empty or is a NULL collection then CARDINALITY function in Oracle SQL / PLSQL will return NULL.

Using Oracle SQL Cardinality Function with SELECT Statement

SELECT employee_id
       ,CARDINALITY(location)
FROM employee;

The example above shows the use of Oracle SQL Cardinality Function with SQL SELCt Statement.


Filed Under: function Tagged With: CARDINALITYPLSQL, How to use CARDINALITY function in oracle sql plsql with example, What is cardinality function in oracle sql plsql

Copyright © 2023 · Parallax Pro on Genesis Framework · WordPress · Log in