如何将A数据库内的表复制到B数据库

如题所述

B数据库存在表
use B
go
insert into tablename
select * from A【.schema】.tablename

B数据库不存在表,用下面语句就省得建表了
use B
go
select * into tablename
from A【.schema】.tablename

schema系统默认的是dbo,可以根据自己的需要做修改
温馨提示:答案为网友推荐,仅供参考
相似回答