连续序号的 sql语句

2022-05-08 18:15:28

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