当前位置:主页 > >

连续序号的 sql语句

时间:2020-10-18 11:03:53 | 栏目: | 点击:

复制代码 代码如下:

# id唯一,num连续序号
# select a.id,num=(select count(1) from tb b where b.id<=a.id ) from tb a

您可能感兴趣的文章:

相关文章