且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在sqlserver 2005中将一个数据库表复制到另一个数据库....请帮忙

更新时间:2023-11-27 15:04:22

你有没有谷歌搜索它?快速搜索 sql server复制表到另一个数据库会产生大量的结果,其中大部分都看起来很有希望。检查此处 [ ^ ]



尝试阅读常见问题解答(这一个 [ ^ ]和这一个 [ ^ ]),然后进行自己的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