STDEV (T-SQL)

Returns the statistical standard deviation of all values in the given expression.

Syntax

STDEV(expression)

Arguments
expression

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.

Return Types

float

Remarks

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.

Examples

This example returns the standard deviation for all royalty payments in the titles table.

USE pubs

SELECT STDEV(royalty)

FROM titles

  

See Also

Aggregate Functions

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.