How to back up a single table in SQL

Anytime you are doing any changes in a production SQL database you should back up the information being changed. If you only need to change a couple of tables, you can use the script below to backup each table individually.

 It is important to follow a standard when backing up tables in order to make it easier to find later. In the example below, all of your backups will include the prefix bak, the name of the table being backed up, your initials, and the date the backup table was created.

Select * into bak_[TABLENAME]_[INT]_[DATE] from [TableName]

The back up table will be an exact copy of the data an schema of the parent table.

Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted for approval.