1、GREATEST(n1,n2,n3,..........) 获取最大值
testdb=#SELECT GREATEST(,,,,,,,,,);
+---------------------------------------------------------+
| GREATEST(,,,,,,,,,) |
+---------------------------------------------------------+
| |
+---------------------------------------------------------+
row in set (0.00 sec)
2、LEAST(N1,N2,N3,N4,......) 获取最小值
testdb=#SELECT LEAST(,,,,,,,,,);
+---------------------------------------------------------+
| LEAST(,,,,,,,,,) |
+---------------------------------------------------------+
| |
+---------------------------------------------------------+
row in set (0.00 sec)
其他更多函数参考:http://developer.51cto.com/art/201401/426252_all.htm