VAR function is used to perform statistical variance of all values in the given expression.It can be used with numeric
type columns only. Null values are ignored while performing variance of an
expression.
Syntax of VAR function :
VAR (expression )
Expression is avalid expression in sql sever of type numeric except bit
data type.
Return type
of VAR function is float.
Example
of VAR function :
SELECT VAR(Royalty)
FROM Products
Output
361.838271213972
Above example returns statistical variance of royalty column.