abs
Return the absolute value of a number
abs
(in num any);
Parameters
num –
Numeric value whose absolute value is to be
returned
Return Types
Same as parameter type.
Description
abs returns the absolute value of its argument.
Examples
Simple example
Get absolute values of several numeric values
SQL> select cast (abs (-2.343) as numeric),
cast(abs (0) as numeric),
cast (abs (3.1415) as numeric);
callret callret callret
DECIMAL DECIMAL DECIMAL
_________________________________________
2.343 0 3.1415
1 Rows. -- 5 msec.