delete without where not possible Follow
Yesterday i wanted to delete all content of a table and tried to execute the command "delete from <tablename>" in the console. Datagrip prohibit this with a warning "Unsafe query: 'Delete' statement without 'where' clears all data in the table". This is quite good to prevent accidentially deletion. But there is no option to overwrite this behavior. I have to add a dummy "where 1=1" to get the statement executed. I would like to see a dialog box instead with the warning and the possibility to delete the data anyway.
Please sign in to leave a comment.
You should see a yellow note at the bottom of console like this:
and here are 2 options - `execute` & `execute and suppress` (this one disables warning forever)
Thank you for the hint. I have missed the two links because in full screen mode the hint is a one liner and the links are placed on the far right. Also the contrast between foreground and background is a bit weak. I should better use a light color theme. There the contrast is better.
Is there a way of disabling this warning on a per query basis, rather than disabling the check forever?
There is no such an option. Could you file an issue in DataGrip YouTrack?
How to enable it back. If I click `execute and suppress` once.
Gwalke20, Preferences/Settings | Database | Query Execution | Show warning before running potentially unsafe queries.