gcd()

Computes the greatest common divisor of x and y

Reference: DuckDB 2.0.0

Alias of greatest_common_divisor()

Arguments & returns

2 overloads

gcd(x, y)

Scalar
Overload link xy Returns
#01 BIGINTBIGINT BIGINT
#02 HUGEINTHUGEINT HUGEINT

Example

gcd example
SQL
Haybarn WASM 2.0.0-rc12 · In your browser

Engine example · Run to view results.