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

copy table from sql server 2005 one db to another

100+
P: 106
hi
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.
Exam)
Restore the DB1.bak with DB2 (database name)

Step 2:
USE DB1
GO
SELECT * INTO table1 FROM DB2.dbo.table1
GO

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.

Thanks,
- Karthick
Oct 10 '08 #2

Post your reply

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