Click here to Skip to main content
13,145,568 members (45,674 online)
Rate this:
Please Sign up or sign in to 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.

Posted 16-Sep-12 20:25pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Dear friend

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
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170915.1 | Last Updated 5 Feb 2014
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100