Skip to main content
Version: current [25.x]

Categories: Math

PMOD

Returns the positive remainder after dividend / divisor. Returns an error if the divisor is 0.

Syntax

PMOD(dividend NUMERIC, divisor NUMERIC) → NUMERIC

  • dividend: Dividend value.
  • divisor: Divisor value.

Examples

PMOD example
SELECT pmod(10, 3)
-- 1
PMOD example
SELECT pmod(-10, 3)
-- 2