Find the remainder of a divided by b for the integer type. For the floating-point type, please use the fmod function.
MOD(<col_a> , <col_b>)
| Parameter | Description |
|---|---|
<col_a> | Dividend |
<col_b> | Divisor should not be 0 |
Return an integer type. Special cases:
If col_a IS NULL or col_b IS NULL, return NULL.
select mod(10, 3);
+----------+ | (10 % 3) | +----------+ | 1 | +----------+
select mod(10, 0);
+----------+ | (10 % 0) | +----------+ | NULL | +----------+