请问下现有多个结构相同的sqlserver数据库数据怎么合并?
时间:2011-11-16
来源:互联网
作者: hello_ww 发布时间: 2011-11-16
试试DTS导入导出。
作者: AcHerat 发布时间: 2011-11-16
insert into dbname1..tb1 select * from tbname3..tb1
...
insert into dbname1..tb1 select * from tbnamen..tb1
其他表类似.
作者: dawugui 发布时间: 2011-11-16
作者: hello_ww 发布时间: 2011-11-16
--表名
select name from sysobjects
where type='U'
作者: dawugui 发布时间: 2011-11-16
作者: fredrickhu 发布时间: 2011-11-16
作者: hello_ww 发布时间: 2011-11-16
作者: AcHerat 发布时间: 2011-11-16
union all
select * from B
作者: ssp2009 发布时间: 2011-11-16
作者: hello_ww 发布时间: 2011-11-16
这样写SQL是不是太慢了,我有几十个数据库,每个库有一百多张表
作者: dawugui 发布时间: 2011-11-16
insert into db1.dbo.tb select * from db2..tb1 union all select * from db2..tb2 union all select * from db2..tb3 union all ... ... union all select * from db2..tbn union all select * from db3..tb1 union all select * from db3..tb2 union all select * from db3..tb3 union all ... ... union all select * from db3..tbn union all ... ... ... ... select * from dbn..tb1 union all select * from dbn..tb2 union all select * from dbn..tb3 union all ... ... union all select * from dbn..tbn
作者: qianjin036a 发布时间: 2011-11-16
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28