Code Inspection: Delete or update statement without where clauses
Reports usages of DELETE or UPDATE statements without WHERE clauses.
Without WHERE clauses, DELETE drops all the data from the table, and UPDATE overwrites values for all the table rows.
Example (MySQL):
CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);
update t1 set a = 'Smith';
delete from t1;
Suppress an inspection in the editor
Place the caret at the highlighted line and press Alt+Enter or click .
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.
Last modified: 25 March 2024