MOD()

Scalar. Returns the remainder of dividing one expression by another.

Syntax

MOD( dividend, divisor )
Data Types

Return

dividend

divisor

Integer

Integer

Integer

Long

Long

Long

Float

Float

Float

Interval

Interval

Interval

Example

The following example calculates the modulo of two columns:

INSERT INTO OutStream
SELECT MOD(Orders.value, Orders.price)
FROM Orders;