I wonder whether tooling that is commonly used to query a database should detect these common mistakes and warn you. `psql` could easily pop up a warning "Are you sure you wanna drop this entire table?".
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.