总结几种MySQL中常见的排名问题
前言: 在某些应用场景中,我们经常会遇到一些排名的问题,比如按成绩或年龄排名。排名也有多种排名方式,如直接排名、分组排名,排名有间隔或排名无间隔等等,这篇文章将总结几种MySQL中常见的排名问题。 创建测试表 create table scores_tb ( id int auto_increment primary key, xuehao int not null, score int not null ) ENGINE=InnoDB DEFAULT CHARSET=utf8; insert into scores_tb (xuehao,score) values (1001,89
下载地址
用户评论