Skip to main content

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
└──────────────────────────┘
Did this page help you?
Yes
No
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today