DB2 Scalar functions - MOD
Returns the remainder of the first argument divided by the second argument.
The schema is SYSIBM. (The SYSFUN version of this function continues to be available.)
The formula for calculating the remainder is:
MOD(x,y) = x-(x/y)*y
The result only is negative when the first argument is negative.
The result can be null if either argument can be null or if neither argument is a decimal floating-point number and the dft_sqlmathwarn database configuration parameter is set to YES; the result is the null value when either argument is NULL.
The data type of the result depends on the data types of the arguments.
If either argument is a special decimal floating-point value, the general arithmetic operation rules for decimal floating-point apply.
SELECT MOD(:M1, :M2) FROM SYSIBM.SYSDUMMY1