This article is written about how to use the Oracle/PLSQL VAR_SAMP characteristic with syntax and examples.
Description
The Oracle/PLSQL VAR_SAMP feature returns the sample variance of a set of numbers.
Syntax
The syntax for the VAR_SAMP characteristic 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 feature eliminates all null values earlier than performing its calculations.
Applies To
The VAR_SAMP characteristic can be used in the following variations of Oracle/PLSQL:
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
Example
Let’s look at some Oracle VAR_SAMP characteristic examples and discover how to use the VAR_SAMP feature in Oracle/PLSQL.
For example:
select VAR_SAMP(char_length)
from all_tab_columns;
Leave a Review