📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

MODULO



Returns the remainder of x divided by y. If y is 0, it returns an error.

Syntax

MODULO( <x>, <y> )

Aliases

Examples

SELECT MOD(9, 2), MODULO(9, 2); ┌──────────────────────────┐ │ mod(9, 2) │ modulo(9, 2) │ ├───────────┼──────────────┤ │ 11 │ └──────────────────────────┘

Was this page helpful?