Sqlite Abs Function
SQLite: abs Function
This SQLite post explains how to use the SQLite abs function with syntax and examples.
Description
The SQLite abs function returns the absolute value of a number.
Syntax
The syntax for the abs function in SQLite is:
Parameters or Arguments
- number
The number to convert to an absolute value.
Note
- The abs function returns NULL, if the number parameter is a NULL value.
- The abs function returns 0.0, if the number parameter is a string or blob that does not evaluate to a numeric value.
Applies To
The abs function can be used in the following versions of SQLite:
- SQLite 3.8.6, SQLite 3.8.x, SQLite 3.7.x, SQLite 3.6.x
Example
Let's look at some SQLite abs function examples and explore how to use the abs function in SQLite.
For example: