连续序号的 sql语句

数据库 发布日期:2024/10/7 浏览次数:1

正在浏览:连续序号的 sql语句
复制代码 代码如下:
# id唯一,num连续序号
# select a.id,num=(select count(1) from tb b where b.id<=a.id ) from tb a