Question

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?

Was it helpful?

Solution

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'.

OTHER TIPS

In MySQL Workbench, with the cell selected, press Shift + Delete

Tested on 6.3.4.0

Removing the contents:

This works for some tools (sorry to hear it doesn't for yours). This may not appear as null but will when you perform a query.

I'd try Ctrl-0 (zero), because that works in some tools.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top