时间:2021-07-01 10:21:17 帮助过:58人阅读
GREATEST()函数返回输入参数(n1, n2, n3, 等)组的最大值。下面的示例使用 GREATEST()函数从一组数字值中返回最大的值:
mysql>SELECT GREATEST(3,5,1,8,33,99,34,55,67,43);
+---------------------------------------------------------+
| GREATEST(3,5,1,8,33,99,34,55,67,43) |
+---------------------------------------------------------+
| 99 |
+---------------------------------------------------------+
1 row in set (0.00 sec)
住:GREATEST()函数是LEAST()函数的相反函数。