Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Unable to set NULL in Foreign key field

Acs's profile image Acs posted 6 years ago in General Permalink
Hey,

So when I try to set a value in the Data tab for a foreign key value I am presented with a dropdown with all the values of the field that foreign key links to.

This is all very nice, but the problem is that I have the "Allow NULL" set for that foreign key and from the Data tab there doesn't seem a way to set that field back to NULL.

I am using the latest version (9.2.0.4974)
ansgar's profile image ansgar posted 6 years ago Permalink
You should be able to focus the field and press Shift+Ctrl+N (or rightclick > "Insert value" > "NULL"). Do not enter the editing mode in that field!
Acs's profile image Acs posted 6 years ago Permalink
You are correct, but wouldn't it be easier just to set an empty line in the select (or something with (NULL))?

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.