QL0040 Missing WHERE Warning
An UPDATE or DELETE statement has no WHERE clause and may affect more rows than intended.
When It Appears
- This warning applies to statement types where an omitted filter often indicates a risky mass update or delete
- The SQL may still be syntactically valid
Example
var update = new SqlUpdate("UPDATE dbo.orders SET status = @Status");
Assert.Contains(update.Warnings, issue => issue.Code == "QL0040");
Why It Is A Warning
Mass updates and deletes can be intentional, but they are risky enough to deserve explicit review.