Oracle / PLSQL: VARIANCE Function

This article is written about how to use the Oracle/PLSQL VARIANCE characteristic with syntax and examples.


The Oracle/PLSQL VARIANCE characteristic returns the variance of a set of numbers.


The syntax for the VARIANCE feature in Oracle/PLSQL is:

VARIANCE( expression )

Parameters or Arguments

expression A numeric expression that is used in the calculation.


The VARIANCE function returns a numeric value.

Applies To

The VARIANCE feature can be used in the following versions of Oracle/PLSQL:

Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i


Let’s look at some Oracle VARIANCE function examples and explore how to use the VARIANCE characteristic in Oracle/PLSQL.

For example:

select VARIANCE(char_length)
from all_tab_columns;