第二大值:select max(num) from table
where num not in(select max(num) from table)
第三大值:select max(num) from table
where num not in(select max(num) from table
where num not in(select max(num) from table))
最小值:select min(num) from table
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 最小
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)