如何在sqlserver 2005中将一个数据库表复制到另一个数据库....请帮忙 [英] How to copy one database tables to another database in sqlserver 2005 ....Please help

查看:72
本文介绍了如何在sqlserver 2005中将一个数据库表复制到另一个数据库....请帮忙的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



我的SqlServer 2005中有两个数据库。



例如:我有数据库(SchoolDB)和另一个数据库(CollegeDB)



现在从这两个DATABASES我需要创建一个数据库.....好的。



我的要求是:在CollegeDB我有两个表StudentInformation和TeachersInformation。所以我必须将这两个表复制到带有所有数据的SchoolDB数据库。





请有人帮帮我,怎么样这样做。





感谢。

Dear Friends,

I have Two databases in my SqlServer 2005.

For Example : I have Database(SchoolDB) and another Database(CollegeDB)

Now From these Two DATABASES I need to make One Database.....OK.

My requirement is : In CollegeDB i have two Tables StudentInformation and TeachersInformation. So i have to copy these two tables to SchoolDB Database with all the data in it.


Please can anybody help me, how to do this.


THANKS FOR EVER.

推荐答案

你有没有谷歌搜索它?快速搜索 sql server复制表到另一个数据库会产生大量的结果,其中大部分都看起来很有希望。检查此处 [< a href =https://www.google.com/search?source=ig&rlz=1G1GGLQ_RORO276&q=sql+server+copy+table+to+another+database&oq=sql+server+copy+& gs_l = igoogle.3.2.0l10.36.2323.0.3979.16.13.0.2.2.0.367.1493.9j3j0j1.13.0 ... 0.0 ... 1ac.1.B-hC95kb-6ktarget =_ blank> ^ ]



尝试阅读常见问题解答(这一个 [ ^ ]和这一个 [ ^ ]),然后进行自己的Google搜索,然后,如果您仍有问题,请尝试在论坛中发帖。我们不会在这里进行您的Google搜索或项目/任务调查。我们在这里帮助你,如果你已经做了它们仍然有问题。
Did you try googling it? A quick search for sql server copy table to another database yields tons of results, most of which look promising. Check here[^]

Try reading the FAQs (this one[^] and this one[^]), then do your own Google searches, and then, if you still have the problem, try posting in the forums. We are not here to do your Google searches, or your project/task research. We are here to help you in case you did them already and still have a problem.


亲爱的朋友



Dear friend

SELECT *
INTO Newdb.StudentInformation 
FROM Schooldb.StudentInformation  







同样的方式对于其他表和其他数据库



这个新数据库是你的新数据库



谢谢你

Sanju




same way do it for the other table and other database

in this NEW DB is your new databse

Thank You
Sanju


我知道这个问题已经过了一年多了,但还没有解决方案标记为已接受。



所以,除了Google-ing的答案或尝试Sanju编写的t-sql之外,我建议先阅读这个帖子:

在SQL Server中将表从一个数据库复制到另一个数据库



它提供了您要求的所有信息。

希望我帮助
I know the question is over a year old, but no solution is marked as accepted yet.

So, beside Google-ing for the answer or trying the t-sql written by Sanju, I suggest reading this thread first:
Copy tables from one database to another in SQL Server

It provides all the information you've asked for.
Hope I helped


这篇关于如何在sqlserver 2005中将一个数据库表复制到另一个数据库....请帮忙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆