Returns the statistical standard deviation for the population for all values in the specified expression.
Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.
If STDEVP is used on all items in a SELECT statement, each value in the result set is included in the calculation. STDEVP can be used with numeric columns only. Null values are ignored.
STDEVP is a deterministic function when used without the OVER and ORDER BY clauses. It is nondeterministic when specified with the OVER and ORDER BY clauses. For more information, see Deterministic and Nondeterministic Functions.
The following example returns the standard deviation for the population for all bonus values in the SalesPerson table in the AdventureWorks2012 database.
SELECT STDEVP(Bonus) FROM Sales.SalesPerson; GO