查询学生成绩,并做排名(字段为sort)处理
SELECT username,yuwen,
(SELECT COUNT(*)+1 FROM studentinfo WHERE a.yuwen<yuwen) AS sortFROM studentinfo AS a order by sort
查询学生成绩,并做排名(字段为sort)处理
SELECT username,yuwen,
(SELECT COUNT(*)+1 FROM studentinfo WHERE a.yuwen<yuwen) AS sort