Here's the thing, I keep deleting rows in MySQL Workbench(this is the third time) because I usually open a tab for each table from where I need to view data, and I recycle that same tab(so as not to clog it), so let's say I open users tab, to view user id's 24's data, but then I need to see the data from user with ID 26, so I just replace the WHERE part to id = 26 or whatever, but sometimes I also do DELETE statements, but don't close the tab, so let's say a week later I want to look the user with id 28, I go to the users tab and just replace the WHERE part thinking it's a SELECT statement only to my horror to find it's a DELETE statement.
So, what can I do to safely delete data, for example for a popup to open saying do you really want to delete this? So I know it's a delete statement. Of course I could look the statement for if it's a SELECT or DELETE and I've tried, but I do a lot of SELECT statements and queries, that I want to see if there's a safer way. The safe mode inherent to the Workbench works for general delete statements but not specific ones(WHERE X). Maybe there's not an option like that in MySQL's Workbench, but there is in another alternative software? And yes, I'm stupid and careless, and try to put attention but I do a lot of queries every day and don't want to slip up again
A good way to handle this is to use transactions;
For example
delete from users where id = 2
As a safe guard you would then wrap this statement in a transaction that rolls back.
start transaction;
delete from users where id = 2
rollback;
Now the only way to delete the user would be to select only the second row or to change rollback
to commit
and run the entire query.
On another note you could write the above query to see changes in your transaction e.g.
start transaction;
select * from users where id = 2; # user exists
delete from users where id = 2;
select * from users where id = 2; # user gets deleted
rollback;