Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Copy tables from one db to another

Author  Topic 

RichardSteele
Posting Yak Master

160 Posts

Posted - 2012-02-05 : 18:43:43
I'd like to copy a group of tables from one database to another. I'm using SQL Server 9.0.4060.

These tables have identity fields, primary keys, indexes, default values and bit fields.

This is the code I was going to use.
SELECT * INTO TargetDB.dbo.NewTable FROM existingdb.dbo.existingtable

What will I have to manually here to make sure both tables are exactly the same in all regards?

Many thanks.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-02-05 : 19:18:13
Dupe:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=170858
Go to Top of Page
   

- Advertisement -