Delete vs Truncate in SQL Server

Home/Development, SQL Server/Delete vs Truncate in SQL Server

Delete vs Truncate in SQL Server

$15.00 $4.00

The biggest myth ever in SQL Server is TRUNCATE operation cannot be rolled back whereas DELETE operation can, as DELETE operation fills the transaction log with enough details to rollback which is not in the case of TRUNCATE. This lab proves that TRUNCATE operation also a logged operation and can be rolled back. In the first exercise, we will learn the logging differences between TRUNCATE and DELETE and also learn to roll back the TRUNCATE operation. In the second exercise, we will learn to recover the deleted data due to TRUNCATE or DELETE operation by using transaction log.

Exercise 1: Logging In TRUNCATE And DELETE
Exercise 2: Recover Deleted/Truncated Data

Categories: ,

Description

The biggest myth ever in SQL Server is TRUNCATE operation cannot be rolled back whereas DELETE operation can, as DELETE operation fills the transaction log with enough details to rollback which is not in the case of TRUNCATE. This lab proves that TRUNCATE operation also a logged operation and can be rolled back. In the first exercise, we will learn the logging differences between TRUNCATE and DELETE and also learn to roll back the TRUNCATE operation. In the second exercise, we will learn to recover the deleted data due to TRUNCATE or DELETE operation by using transaction log.

Exercise 1: Logging In TRUNCATE And DELETE
Exercise 2: Recover Deleted/Truncated Data

Data Platform Virtual Summit 2020

Subscribe to SQLMaestros YouTube channel. If you want more learning content in your inbox, subscribe to SQLMaestros Bulletin.

SQLMaestros YouTube | SQLMaestros Bulletin | SQLMaestros Twitter

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.