How to make a field NULL using MySQL GUI Tools?

nickf picture nickf · Nov 14, 2008 · Viewed 31.2k times · Source

I'm using the MySQL Query Browser (part of the MySQL GUI Tools) and need to change a field to NULL, but I can't figure out how to do it - if I delete the value it tries to update it to ''. Typing "NULL" makes it try to update to 'NULL' (a string).

I know I could just write a query to do it, but that defeats the entire purpose of the tool, no?

Answer

Jonas Kongslund picture Jonas Kongslund · Nov 14, 2008

In MySQL Query Browser, right click on the cell and select 'Clear field content' while the focus is in another cell.

In MySQL Workbench, right click on the cell and select 'Set Field to NULL'.