MYSQL数据库排序查询名次 select u.rowNo from ( select id,(@rowNum:=@rowNum+1) as rowNo from TABLE, (select (@rowNum :=0) ) b order by TABLE.ORDER_FIELD desc limit 1000) u where u.id=123;