实现代码如下:# id唯一,num连续序号 # select a.id,num=(select count(1) from tb b where b.id<=a.id ) from tb a 以上就是【连续序号的 sql语句】的全部内容了,欢迎留言评论进行交流!