Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.
Posted

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.
 
Share this answer
 
Dear friend

SQL
SELECT *
INTO Newdb.StudentInformation 
FROM Schooldb.StudentInformation  



same way do it for the other table and other database

in this NEW DB is your new databse

Thank You
Sanju
 
Share this answer
 
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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900