Delete all data in SQL Server database

前端 未结 10 1094
粉色の甜心
粉色の甜心 2020-12-04 05:11

How I can delete all records from all tables of my database? Can I do it with one SQL command or I need for one SQL command per one table?

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-04 05:56

    It is usually much faster to script out all the objects in the database, and create an empty one, that to delete from or truncate tables.

提交回复
热议问题