Logo 
Search:

SQL Server Articles

Submit Article
Home » Articles » SQL Server » Aggregate FunctionsRSS Feeds

VAR Function

Posted By: Sarita Patel     Category: SQL Server     Views: 5419

This article explains the use of VAR function in sql server with example.

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.

 

  
Share: 

 
 
 

Didn't find what you were looking for? Find more on VAR Function Or get search suggestion and latest updates.

Sarita Patel
Sarita Patel author of VAR Function is from United States.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!