select (select count(1)+1 from tb_cgxd2 as b where b._id<tb_cgxd2._id) _id,_pp from tb_cgxd2
这样是会自动从1顺序显示序号的。
select (select count(1)+1 from tb_cgxd2 as b where b._id<tb_cgxd2._id) _id,_pp from tb_cgxd2 where _cgdh='120621163301'
这个我在后在加了采购单号查询。序号就不再是从1开始顺序显示了。要怎样改才可以呀?那位高手指点一下呀。先感谢了。
显示如图,序号不连续了。怎样才能连续编号呢?