mysql最大、第二、第三

最大值:select max(num) from table
第二大值: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
posted @ 2016-02-29 20:22  zhou09  阅读(454)  评论(0编辑  收藏  举报