不需要排序
select (row_number() over()) as id from generate_series(1,100)
1
根据指定的字段排序
select (row_number() over(order by xxx desc)) as id,xxx from generate_series(1,100) as xxx
---------------------
作者:kmblack1
来源:CSDN
原文:https://blog.csdn.net/kmblack1/article/details/79759995
版权声明:本文为博主原创文章,转载请附上博文链接!