In Transact-SQL (T-SQL) DELETE allows us to remove one or more rows from a table. This lab is divided into five exercises explaining different ways of deleting data from a table. In first exercise we will learn to delete duplicates from a table using CTE. In second exercises we will learn to delete rows using JOINs. In third exercise we will learn to remove data from a table using TRUNCATE. Fourth exercise is self-assessment, where a problem is given and you need to solve by yourself. Fifth exercise presents a TSQL challenge that needs to be solved by you (slightly tougher that self-assessment).
Exercise 1: DELETE duplicate records from a table
Exercise 2: DELETE the rows using a JOIN query
Exercise 3: Remove data from a table using TRUNCATE
Exercise 4: Self-Assessment
Exercise 5: T-SQL Challenge