THE WORLD'S LARGEST WEB DEVELOPER SITE

SQL Server ABS() Function

❮ SQL Server Functions

Example

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

❮ SQL Server Functions