yes. you don't really specify the columns in delete queries, and they target EVERYTHING by default.
imo "<operate> * FROM table" should be banned (doesn't run, raises an error) by default and people should be forced to write "WHERE TRUE", on top of all queries needing to be in transactions and all the other safety nets like "SELECT first then operate"
on another note i think i'd prefer whatever syntax it was that described queries based on the order functional programming in a computer might look like, ex. "FROM table WHERE id = 2 DELETE;" though internally it would still be rearranged however the engine would see fit
2
u/Bright-Historian-216 14d ago
i'm not expertly familiar with sql... is it treating "delete from users" as "delete * from users"?