T-SQL 101: 136 Deleting Rows from a SQL Server Table
The DELETE statement is one of the most common SQL statements. We use it to remove rows from a table.
In the example, I’ve said to delete rows from the dbo.CinemaGroups table where the value in the CinemaGroupID column is greater than 3.
You need to make sure that your DELETE statements have WHERE clauses, unless what you’re intending to do is delete all the rows in the table. You don’t want to make the common mistake where people highlight a DELETE statement in SQL Server Management Studio and forget to include the WHERE clause as well.
2025-03-28