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?
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.
select * into mytable_backup from mytable
Makes a copy of table mytable, and every row in it, called mytable_backup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With