Duplicate a table including indexes

后端 未结 2 1203
北海茫月
北海茫月 2021-01-21 12:09

Is there a way to duplicate a table in SQL-Server? Not just the data like SELECT INTO does but also indexes and maybe keys as well? If I go script table as -> c

2条回答
  •  有刺的猬
    2021-01-21 12:44

    Just generate a CREATE script in SQL Server Management Studio. This will also include the indexes.

    See this dba.se question

提交回复
热议问题