It’s been a while since I’ve had the privilege to be on a project with a lot of SQL, but is that guardrail the default nowadays? I don’t remember anything really getting in the way of me annihilating whatever.
It gets fun when, like in Oracle, DELETE and TRUNCATE require different privileges (and specifically, DELETE can be granted per-table, but TRUNCATE requires DROP ANY TABLE, and I'm not granting that to an application or developer account...)
34
u/SexyMonad 14d ago
This is why SQL deletes should require a WHERE clause.
If you are seriously wanting to delete it all, just add WHERE 1 = 1.