DF035: The DELETE statement is used without the limiting clauses.
Last modified: May 28, 2025
The topic describes the DF035 T-SQL code analysis rule.
Category
BEST PRACTICE
Message
The DELETE statement is used without the limiting clauses.
Description
The DELETE statement without the row limiting conditions (WHERE or JOIN clauses) may lead to unexpected data loss.
Additional information
Without these conditions, the DELETE statement removes all rows from the specified table, which can result in the deletion of important data. It’s important to include appropriate conditions in the DELETE statement to ensure that only the intended rows are deleted. This helps prevent accidental data loss and maintains data integrity within the database.
Noncompliant code example
DELETE FROM dbo.Employee;
Compliant solution
DELETE FROM dbo.Employee WHERE EmployeeId = 12;
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.