Name

abs() — Compute the numerical absolute value

Common Usage

abs( expression )

Description

The abs() function returns the absolute value of an expression. If the expression is an integer, an integer absolute value is returned. If expression is a float, the floating-point absolute value is returned. If number is NULL, a NULL is returned. All other datatypes are first converted to floating-point values, then the absolute value of the converted floating-point number is returned.

Get Using SQLite 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.