totn Oracle Functions

Oracle / PLSQL: VAR_SAMP Function

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

Description

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

Syntax

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

VAR_SAMP( expression )

Parameters or Arguments

expression
A numeric expression that is used in the calculation.

Returns

The VAR_SAMP function returns a numeric value.

Note

  • The VAR_SAMP function eliminates all null values before performing its calculations.

Applies To

The VAR_SAMP 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 VAR_SAMP function examples and explore how to use the VAR_SAMP function in Oracle/PLSQL.

For example:

select VAR_SAMP(char_length)
from all_tab_columns;