December 3rd, 2008

ABSOLUTE or ABS (absolute value)

The ABSOLUTE or ABS function converts the numeric value in the argument to its absolute value. In other words, a negative value is changed to a positive value.

Format:            ABS(expression)
Example:           SELECT ABS(-1) FROM TABLEA;

Result:

                   

> Access, DB2, MySQL, PostgreSQL, SQL Server, and Sybase support the ABS function.> ABSOLUTE and ABS are synonymous.

Comments are closed.

Sorry, the comment form is closed at this time.