Export (0) Print
Expand All

ABS Function

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Returns the absolute value of a number.





The number for which you want the absolute value.

A decimal number.

The absolute value of a number is a decimal number, whole or decimal, without its sign. You can use the ABS function to ensure that only non-negative numbers are returned from expressions when nested in functions that require a positive number.

The following example returns the absolute value of the difference between the list price and the dealer price, which you might use in a new calculated column, DealerMarkup.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft