Oracle ABS Function Guide
In Oracle database, the absolute value function is used by using the ABS function to return the absolute value of a number. The ABS function takes a numerical value as a parameter and returns the non-negative value of that number, effectively removing its sign.
Here is the syntax for the ABS function:
ABS(number)
- number: numerical expression to calculate the absolute value of.
For example, if we want to obtain the absolute value of -10 in an Oracle database, we can write it like this:
SELECT ABS(-10) AS absolute_value FROM dual;
The result will be 10 because the ABS function returns the absolute value of -10.