How to set cell to null in datagrip?

Is there a quick way without diving into sql to return a specific null attribute? input to "" does not work.

+10
source share
3 answers

You also can:

  1. Select a field, right-click and select "Set NULL"
  2. Select a field, press CTRL + ALT + N (on Windows).

Note that the logical fields will be displayed as a field filled with a dash (-) when zero.

If the "Set NULL" option is not displayed, you may need to update the scheme, which can be done by clicking the synchronize button:

enter image description here

or by pressing Ctrl + Alt + Y (on Windows).

+13
source

If set null is not an option, try synchronizing the table schema. Right-click on the table and sync (Ctrl-Alt-Y)

+1
source

There seems to be a bug related to this, as you will find many people on the network who do not see the “Set Null” -option, and even report issues reported by Jetbrains. Instead, I'm leaning towards the original SQL:

 UPDATE <table> SET <column> = NULL WHERE <condition> 

Hope Jetrains fix this error in DataGrip.

0
source

Source: https://habr.com/ru/post/1258510/


All Articles