- Open the Software(MySQL Workbench).
- Go to Edit --> Preferences.
- "Workbench Preferences" window will open. Select the "SQL Queries" Tab.
- Under "General" section, Uncheck the "Safe Updates". Forbid UPDATEs and DELETEs with no key in WHERE clause or no LIMIT clause. ... option.
- Close the software and open. So settings are apply to the next query execution.
2. Or Directly adding the following statement to beginning of the query execution.
This is common error face by the beginners of MySQL Users / Workbench users while Truncating, Altering or updating the tables.