select row_number() over (order by ColName) from TableName 转载于:https://blog.51cto.com/2311390/1705508