Name

ABS

Synopsis

All platforms have standard SQL2003 support for the ABS function.

SQL2003 Syntax

ABS( expression )

ABS returns the absolute value of the number in expression.

Example

The following shows how to use the ABS function:

/* SQL2003 */
SELECT ABS(-1) FROM NUMBERS1

Get SQL in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.