mysql求字段最大值和最小值

作者: drmeng 分类: 杂谈 发布时间: 2019-06-26 16:27

select max(字段名) from tableName limit 0,1 最大
select min(字段名) from tableName limit 0,1 最小
select * from tableName order by 字段名 DESC limit 0,1 最大
select * from tableName order by 字段名 ASC limit 0,1 最小