为数据库中已有的数据行生成数据如0001,0002等
alter table [dbo].[Dp_Store] add id int identity(1,1)
go
update [dbo].[Dp_Store] set shopNumber=right('00000000'+cast(id as varchar),8) from [dbo].[Dp_Store]
go
alter table [dbo].[Dp_Store] drop column id
select * from [dbo].[Dp_Store]