Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-Server
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 16-Sep-12 21:25pm
Rate this: bad
good
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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Dear friend
 
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
  Permalink  
Rate this: bad
good
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
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 584
1 Maciej Los 275
2 DamithSL 233
3 Sergey Alexandrovich Kryukov 209
4 BillWoodruff 200
0 OriginalGriff 6,803
1 Sergey Alexandrovich Kryukov 6,377
2 DamithSL 5,421
3 Manas Bhardwaj 4,841
4 Maciej Los 4,330


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 5 Feb 2014
Copyright © CodeProject, 1999-2014
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