DELETE * FROM <table>
Yeah, I forgot the WHERE.
This was 15 years ago at my first job and I haven't done it since. I was lucky that we had backups.
Yeah, I forgot the WHERE.
This was 15 years ago at my first job and I haven't done it since. I was lucky that we had backups.
An alternative would be for databases to add an option to prevent accidental deletion. When enabled, would make it impossible to truncate or delete entire tables. I would enable such a setting on my production databases.
At least for PostgreSQL, someone tried:
https://www.postgresql.org/message-id/12104.1150425319%40sss...
But it doesn't seem like it got much serious attention.
I think front-end makes sense, where SQL is a UI, not back-end, where it is an API.