Community

Using T-SQL to find the Greatest Common Divisor (GCD) for any number of integers

(Eli Leiba) I was given the task to write a process to find the greatest common divisor (GCD) of two or more integers. By definition, in mathematics, the greatest common divisor (GCD) of two or more integers, which are not all zero, is the largest positive integer that divides each of the integers.