SQL SERVER Insert into Select

来源:互联网 发布:淘宝客服上下班时间 编辑:程序博客网 时间:2024/05/23 13:54
Insert into tablea (fields1,...) select values1,... from tableb where ...Select id,attdate into newtable from oldtable where id<>'0000000000'
Insert into employyAttRecord (id,AttDate) (Select id,'2013-2-17' from employyTable where id<>'0000000000')

select into from into时要插入新表

Insert into table1 select * from 时可以插入存在的表中

原创粉丝点击