求语句,批量生成序列号。有一表,如下:编号 名字 性别25 张三 男12 李四 女19 王五 男怎么样能够批量重新生成编号,以00001,000002开始[解决办法]
alter table tb alter column [编号] varchar(8)declare @i int select @i=0update tb set id=right(100000+@i,5),@i+=1