Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy table from 1 db to another

Status
Not open for further replies.

rds747

Technical User
Mar 8, 2005
180
US
How do I copy one table from one database to another?
 
What do you want to copy, just the structure, or the data, indexex, constraints..etc??

Jim
 
So you have the table on the second DB with the same structure?
Then you can use DTS by creating a package or using the Import/Export wizard. More simply use an Insert Into statment:
Code:
Insert Into DBName.OwnerName.TableB(column list here)
   Select Column List Here from TableA
If the table doesn't yet exist on the second DB:
Code:
Select * 
Into DBName.OwnerName.TableB
From TableA
Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top