Oracle ABS Function Guide: Syntax & Examples
The ABS function in Oracle database is used to return the absolute value of a number. Its syntax is as follows:
ABS(number)
In this case, the number is the value for which we want to calculate the absolute value. The ABS function will return the absolute value of the number, even if the number is negative, it will return its positive value. Here is an example:
SELECT ABS(-10) FROM dual;
This will yield a result of 10. The ABS function is very useful when dealing with any numerical computation and ensures a non-negative result.