abs function

The abs function returns the absolute value of the input expression.

Syntax:

number abs(n)

Semantics:

Example 1 - abs function

SELECT abs(n) FROM Userstocks
Value of n Output
10 10
-10 10
1.67 1.67
-1.67 1.67