Abstract value demo : ABS « Math « SQL / MySQL






Abstract value demo

/*
mysql> select ABS(0);
+--------+
| ABS(0) |
+--------+
|      0 |
+--------+
1 row in set (0.00 sec)

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

mysql> select ABS(1);
+--------+
| ABS(1) |
+--------+
|      1 |
+--------+
1 row in set (0.01 sec)



*/  
select ABS(0);
select ABS(-1);
select ABS(1);
           
       








Related examples in the same category

1.Use ABS 2