Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

STDEV (Transact-SQL)

Returns the statistical standard deviation of all values in the specified expression. May be followed by the OVER clause.

Topic link icon Transact-SQL Syntax Conventions

STDEV ( [ ALL | DISTINCT ] expression ) 


Applies the function to all values. ALL is the default.


Specifies that each unique value is considered.


Is a numeric expression. Aggregate functions and subqueries are not permitted. expression is an expression of the exact numeric or approximate numeric data type category, except for the bit data type.

If STDEV is used on all items in a SELECT statement, each value in the result set is included in the calculation. STDEV can be used with numeric columns only. Null values are ignored.

The following example returns the standard deviation for all bonus values in the SalesPerson table.

USE AdventureWorks2008R2;
FROM Sales.SalesPerson;
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft