Retrieve the absolute value of a numeric expression.
| SELECT Abs(-243.5) AS AbsNum; |
The ABS() function calculates and returns the absolute value of a number.
| ABS(number) |
|
Parameter |
Description |
|
number |
Required. A numerical value that the function will operate on. |
|
Works in: |
Available in SQL Server from 2008 onward, as well as in Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse. |