Table-level backup

前端 未结 16 1573
孤城傲影
孤城傲影 2020-12-02 06:37

How to take table-level backup (dump) in MS SQL Server 2005/2008?

16条回答
  •  [愿得一人]
    2020-12-02 07:21

    You can run the below query to take a backup of the existing table which would create a new table with existing structure of the old table along with the data.

    select * into newtablename from oldtablename
    

    To copy just the table structure, use the below query.

    select * into newtablename from oldtablename where 1 = 2
    

提交回复
热议问题