SQL Server ABS() Function
ExampleGet your own SQL Server
Return the absolute value of a number:
SELECT Abs(-243.5) AS AbsNum;
Try it Yourself »
Definition and Usage
The ABS() function returns the absolute value of a number.
Syntax
ABS(number)
Parameter Values
Parameter | Description |
---|---|
number | Required. A numeric value |
Technical Details
Works in: | SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse |
---|