By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,124 Members | 550 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,124 IT Pros & Developers. It's quick & easy.

copy table from sql server 2005 one db to another

P: 106
Is it possible to copy single table from one sql server db to another db. I have two copies of same database. I deleted data from table from origional table. now i want to copy the table from other copy of the database. I cannot complete overwrite the original database because there are a lot of new data and i have no backup. Its urgent.
Any help. Thanks in advance
Oct 10 '08 #1
Share this Question
Share on Google+
1 Reply

P: 13
For Example:

1) Server Name as - SERVER1
2) DB Name - DB1
3) Backup Copy name - DB1.bak (taken the backup before deleting the table1)
4) Consider U have delited the table1 from DB1 database

Step 1:
Restore the copy of the DB in to the same server with Different DB name.
Restore the DB1.bak with DB2 (database name)

Step 2:
SELECT * INTO table1 FROM DB2.dbo.table1

Just use the above given steps and use your server name, DB name, table name. You can achive what u want.

Finaly DROP the DB2 database if not required.

- Karthick
Oct 10 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.