REMAINDER
REMAINDER is an SQL function that returns the remainder of a division operation. It consumes two numeric values and carries out the modulus operation to produce the remainder.
Example
SELECT REMAINDER(10, 3) FROM dual;
Output
1
Explanation
The REMAINDER
function in Oracle is used to return the remainder of a division operation between two numbers. In this case, 3 divides into 10 three times with one left over. So the output of the function REMAINDER(10, 3)
is 1.
Example
SELECT REMAINDER(7, 3) AS Result;
Output
Result-----------1
Explanation
The REMAINDER function returns the remainder of the division of the first argument by the second one. In this case, it returned 1 because the remainder of the division of 7 by 3 is 1.