编号后六位处理


去后六位 并 +1

 

1 select right(cast(right(' 2012abcd000001',6)+100000001 as varchar),6)

 

前面不变,后六位依次 +1 插入表格中

 

1 insert into  table (id)    select ('2012abcd'+(select right(cast(right(' 2012abcd000001',6)+100000001 as varchar),6)))

 

 

posted @ 2012-07-27 19:40  心随风若  阅读(178)  评论(0)    收藏  举报