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

后端 未结 10 1716
青春惊慌失措
青春惊慌失措 2020-12-02 07:18

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?

10条回答
  •  难免孤独
    2020-12-02 07:59

    Put the table in its own filegroup. You can then use regular SQL Server built in backup to backup the filegroup in which in effect backs up the table.

    To backup a filegroup see: https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/back-up-files-and-filegroups-sql-server

    To create a table on a non-default filegroup (its easy) see: Create a table on a filegroup other than the default

提交回复
热议问题