Hello Friends,

Here is another popular lab from Hands-On-Lab library: Delete vs Truncate in SQL Server.

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

SQLMaestros Hands-On-Labs enables the practical way of learning. Each lab document consists of multiple exercises and each exercise consists of multiple tasks. Apart from step-by-step instructions, the HOL document contains images, explanations, observations, notes, tips & tricks to ensure a great learning experience. With each lab, you can practice a specific concept step-by-step. With our HOL documents, you will get hands-on with hundreds of topics in SQL Server & Microsoft Data Platform. Learn More.



Happy Learning – The Practical Way.