DB/ORACLE
[Oracle]REMAINDER()
yeon.Biju
2020. 6. 10. 11:27
오라클 REMAINDER
REMAINDER
-
REMAINDER(n2, n1)
의 형태
REMAINDER returns the remainder of n2 divided by n1.
This function takes as arguments any numeric data type or any nonnumeric data type that can be implicitly converted to a numeric data type. Oracle determines the argument with the highest numeric precedence, implicitly converts the remaining arguments to that data type, and returns theat data type.
The MOD function is slmilar to REMAINDER except that is uses FLOOR in its formula, whereas REMAINDER uses ROUND.
SQL>SELECT MOD(111.001,1.7) FROM DUAL ;
---> 0.501
SQL>SELECT REMAINDER(111.001,1.7) FROM DUAL ;
---> 0.501