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.csdn.net/warylee/article/details/77533122