Calculate the modulo of floating-point numbers, a / b. For integer types, please use the mod function.
FMOD(<col_a> , <col_b>)
| Parameter | Description |
|---|---|
<col_a> | Dividend |
<col_b> | Divisor (cannot be 0) |
Returns a floating-point number. Special cases:
select fmod(10.1, 3.2);
+--------------------+ | fmod(10.1, 3.2) | +--------------------+ | 0.4999999999999991 | +--------------------+
select fmod(10.1, 0);
+---------------+ | fmod(10.1, 0) | +---------------+ | NULL | +---------------+
select fmod(10.1, NULL);
+------------------+ | fmod(10.1, NULL) | +------------------+ | NULL | +------------------+