Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backup a single table with its data from a database in sql server 2008

I want to get a backup of a single table with its data from a database in SQL Server using a script.

How can I do that?

like image 845
EBS Avatar asked Oct 31 '13 04:10

EBS


People also ask

How do I backup a single table in SQL Server?

Step 1 : Right click on the database and choose Tasks –> Generate Scripts. Step 2 : Select the database from which you need to take a backup of the table. Step 3 :You will see the Table/View options on the screen while scrolling down. Select the table which you want to back up and Hit next button.


1 Answers

select * into mytable_backup from mytable 

Makes a copy of table mytable, and every row in it, called mytable_backup.

like image 137
MGOwen Avatar answered Sep 22 '22 13:09

MGOwen