Oracle Plsql Variance Function

Oracle / PLSQL: VARIANCE Function

This Oracle tutorial explains how to use the Oracle/PLSQL VARIANCE function with syntax and examples.

Description

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

Syntax

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

VARIANCE( expression )

Parameters or Arguments

expression

A numeric expression that is used in the calculation.

Returns

The VARIANCE function returns a numeric value.

Applies To

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

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

Example

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

For example:

select VARIANCE(char_length)
from all_tab_columns;