日期:2014-05-19  浏览次数:20448 次

sql作业,表之间数据转移
1:同一个数据库中,2个具有相同字段的表。
2:表1中超过30天的数据转移到表2中。
3:求作业代码。

------解决方案--------------------
表1中超过30天的数据转移到表2中。

insert into t2
select * from t1 where datediff(dd,indate,getdate())> 30