------解决方案-------------------- oracle的写法: insert into 表(id,year,b,c,d) select 1,'2012.com',b,c,dfrom 表 where rownum between 0 and 1;
------解决方案-------------------- oracle的写法: insert into 表(id,year,b,c,d) select 1,'2012.com',b,c,d from 表 where rownum between 0 and 1;
------解决方案-------------------- sqlserver的写法: insert into 表(id,year,b,c,d) select top 1 2,'2012.com',b,c,dfrom 表;
mysqlServer的写法: insert into 表(id,year,b,c,d) select 2,'2012.com',b,c,dfrom 表 limit 0,1;
------解决方案--------------------
------解决方案--------------------
------解决方案--------------------
SQL code
insert into table select id = id + 1 , [year] = [year] + 1 , b , c, d from table where id = 1
insert into table select id = id + 1 , [year] = [year] + 1 , b , c, d from table where [year] = 2011