我有一个问题,当我试图选择有一个NULL为某列的行,它返回一个空集。然而,当我在phpMyAdmin中查看表时,它对大多数行表示为空。
我的问题是这样的:
SELECT pid FROM planets WHERE userid = NULL
每次都是空集。
A lot of places said to make sure it's not stored as "NULL" or "null" instead of an actual value, and one said to try looking for just a space (userid = ' ') but none of these have worked. There was a suggestion to not use MyISAM and use innoDB because MyISAM has trouble storing null. I switched the table to innoDB but now I feel like the problem may be that it still isn't actually null because of the way it might convert it. I'd like to do this without having to recreate the table as innoDB or anything else, but if I have to, I can certainly try that.