create table qspm(bmh int identity(1,1),zf int)
insert into qspm(zf) select 70
union all select 80
union all select 90
union all select 88
union all select 87
union all select 76
union all select 76
union all select 97
go
select bmh,zf,'排名'=(select count(a.bmh)+1 from qspm as a where a.zf>qspm.zf) from qspm order by '排名',bmh
insert into qspm(zf) select 70
union all select 80
union all select 90
union all select 88
union all select 87
union all select 76
union all select 76
union all select 97
go
select bmh,zf,'排名'=(select count(a.bmh)+1 from qspm as a where a.zf>qspm.zf) from qspm order by '排名',bmh