Truncate Table Within Transaction

后端 未结 2 935
野性不改
野性不改 2020-12-08 13:19

Can the SQL \"truncate table\" command be used within a transaction? I am creating an app and my table has a ton of records. I want to delete all the records, but if the a

2条回答
  •  没有蜡笔的小新
    2020-12-08 13:33

    In SQL Server, you can rollback a TRUNCATE from a transaction. It does write page deallocation to the log, as you mentioned.

提交回复
热议问题