select ROW_NUMBER() OVER (ORDER BY 字段 DESC) AS rid,* from 表名 转载于:https://www.cnblogs.com/zxhome/p/4726865.html