Jump to: navigation, search

Mysql ABS

From w3cyberlearnings

Contents

MySQL ABS Function

This function returns the absolute value of X input.

Syntax ABS

X is a number.

ABS(X);

Example 1


mysql> SELECT ABS(-32);
+----------+
| ABS(-32) |
+----------+
|       32 |
+----------+
1 row in set (0.00 sec)

Example 2

mysql> SELECT ABS(-0032);
+------------+
| ABS(-0032) |
+------------+
|         32 |
+------------+
1 row in set (0.00 sec)

Related Links


Navigation
Web
SQL
MISC
References