delete without where not possible

Answered

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.

Kind Regards

Andreas

2 comments
Comment actions Permalink

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)

0
Comment actions Permalink

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.

Kind Regards

Andreas

0

Please sign in to leave a comment.