Did you know MySQL has a flag designed to prevent accidentally changing more data than you intended? If not, I think you’ll find it easy to remember as the flag has a memorable name: ‘i-am-a-dummy.’ If you have this flag set and leave off a WHERE clause when updating or deleting data, MySQL will prevent the statement from executing.
Let’s walk through an example using i-am-a-dummy and its “Safe Updates” Workbench counterpart.
Seems like this should be on by default for most servers.