Sql Server 表的复制

声名:A,B ,都是表

--B表存在两表结构一样
insert into B select * from A

若两表只是有部分(字段)相同,则

insert into B(col1,col2,col3,col4,...) select col1,col2,col3,col4,... from A where...

把表A插入到表B中去。

--B表不存在
select * into B from A

//

select (字段1,字段2,...) into B from A

posted @ 2016-02-19 11:06  我的名字叫浩仔丶  阅读(197)  评论(0编辑  收藏  举报