For the complete documentation index, see llms.txt. This page is also available as Markdown.

gcd

This section contains reference documentation for the gcd function.

Returns the greatest common divisor of two long values.

Signature

gcd(col1, col2)

Argument
Type
Description

col1

LONG

First value

col2

LONG

Second value

Returns: LONG

Usage Examples

SELECT gcd(12, 8) AS value
FROM myTable
value

4

SELECT gcd(0, 5) AS value
FROM myTable
value

5

Last updated

Was this helpful?