十八、MySQL 数据排名查询某条数据是总数据的第几条时间:2023-03-10 06:41:22 SELECT a.yhid,a.zjf,a.dqjf,(@rowno:=@rowno+1) as rowno FROM jfxt_yhjfxx a,(select (@rowno:=0)) b ORDER BY a.zjf DESC 注意:mysql的下标是从0开始的 参考文章: https://blog.****.net/warylee/article/details/77533122