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 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, SQL Server 2005

❮ SQL Server Functions