SQL ABS()
ABS function in SQL is used to ELECT absolute value of a number.SYNTAX :
abs(x)
area | angle | num |
36.784 | 45 | 96 |
212.254 | 30 | -78 |
121.001 | 45 | -45 |
141.698 | 185 | -96 |
EXAMPLE:
SELECT ABS(num) as Val from scanf;This would produce following result:
Val 96 78 45 96