How to delete all rows from all tables in a SQL Server database?

前端 未结 11 1176
遇见更好的自我
遇见更好的自我 2020-11-29 15:12

How to delete all rows from all tables in a SQL Server database?

11条回答
  •  离开以前
    2020-11-29 15:45

    You could delete all the rows from all tables using an approach like Rubens suggested, or you could just drop and recreate all the tables. Always a good idea to have the full db creation scripts anyway so that may be the easiest/quickest method.

提交回复
热议问题