SQL Least and Greatest
November 5, 2012
The least
and greatest
functions work in a similar way to coalesce
, in that you can pass in any number of parameters, and the function will return the highest of them all. Parameters can be static values or columns.
SELECT LEAST(44,777,33,22,11)
returns the following on ...