LCM Function

Returns the least common multiple for a set of integers.

Category: Mathematical
Returned data type: DOUBLE

Syntax

Arguments

expression

specifies any valid expression that evaluates to an integer.

Requirement At least two arguments are required.
Data type DOUBLE
See <sql-expression>
FedSQL Expressions

Details

The least common multiple is the smallest number that two or more numbers will divide into evenly.

Example

The following statements illustrate the LCM function:
Statements
Results
select lcm(1,5,3,0);
.
select lcm(25,70,85,130);
77350
select lcm(33,78);
858

See Also

Functions:
Last updated: February 23, 2017