-- 实现SQL语句(最大) SELECT key_0,greatest(x,y,z) as max FROM greatests; -- 实现SQL语句(最小) SELECT key_0,LEAST(x,y,z) as min FROM greatests; -- GREATEST()函数返回在该组输入参数(N1,N2,N3,等等)的最大值。 SELECT GREATEST(99,88,0,456,54,453,6) as "最大值"; -- LEAST()函数与GREATEST()函数相反。其目的是为了从值列表(N1,N2,N3,等等)返回至小值项。 SELECT LEAST(62,5465,0,-5,5) as "最小值";