This article is written about how to use the Oracle/PLSQL VARIANCE characteristic with syntax and examples.
Description
The Oracle/PLSQL VARIANCE characteristic returns the variance of a set of numbers.
Syntax
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.
Returns
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
Example
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;
Leave a Review