Re: How to move tables between databases
From: Keith Kratochvil (sqlguy.back2u_at_comcast.net)
Date: 09/15/04
- Next message: Ray Kurpiel: "RE: How to move tables between databases"
- Previous message: Jaxon: "SQL 2k Sp 4 ????"
- In reply to: Jeff Farquharson: "How to move tables between databases"
- Next in thread: Ray Kurpiel: "RE: How to move tables between databases"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Sep 2004 13:03:33 -0500
Use Enterprise Manager or Query Analyzer to create a CREATE TABLE script for
you. Create the table in the appropriate database. Use INSERT
INTO...SELECT to move the data
OR
SELECT *
INTO TheOtherDatabase.dbo.TheTable
FROM TheCurrentDatabase.dbo.TheTable
and then create the keys and indexes on the new table.
-- Keith "Jeff Farquharson" <JeffFarquharson@discussions.microsoft.com> wrote in message news:2FF36FD6-455A-415A-96F6-43312257CEE3@microsoft.com... > I am in the process of re-organinzing several SQL Server databases so I would > like to move tables from one database to another. I was hoping it would be > as simple as dragging the table from one DB to another in Enterprise Manager, > but no such luck. > > Is there an easy way to move tables between databases? > > Any help would be much appreciated.
- Next message: Ray Kurpiel: "RE: How to move tables between databases"
- Previous message: Jaxon: "SQL 2k Sp 4 ????"
- In reply to: Jeff Farquharson: "How to move tables between databases"
- Next in thread: Ray Kurpiel: "RE: How to move tables between databases"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|