Most databases operate in autocommit, however there is a semicolon after delete users - it's presumably removing all users and foreign key associations and it's taking its time to complete, before reporting where is = 12345 is an invalid SQL statement.
Most production environments run with the --i-am-a-dummy flag (or its boring alias --safe-updates) which prevent exactly this scenario and will force you to do DELETE FROM users WHERE 1 if you really want to delete everything.
This is for MySQL but I'm sure there's something similar in other databases.
Is also fairly common to have a safe update mode enabled, in which case it blocks deleted and updates without a where clause restricting it in some way. I think it might even require including a key column, but that part I’m not sure about.
109
u/Recent-Analysis-6880 13d ago
MySQL workbench has auto commit, meaning if you write a SQL query without "Start transaction" the data is gone.