日期:2014-05-18  浏览次数:20336 次

增加数据
id   (自动增长)       type         name         number
1                                   2             2               1
2                                   3               3             1
3                                     21           21           1
现在要实现
id   (自动增长)       type         name         number
1                                   2             2               1
2                                   3               3             1
3                                   21           21             1
4                                 2             2                 2
5                                 3               3               2
6                                 21           21               2

怎么实现



------解决方案--------------------
SELECT ID = IDENTITY(INT,1,1) , type , name , number INTO 新表 from 原表
------解决方案--------------------
insert into table select type,name,number+1 from table都说过了