In MySQL, NULL è considerato un "valore mancante e sconosciuto", in contrapposizione a nessun valore. Dai un'occhiata a questo riferimento MySQL su NULL .
Qualsiasi confronto aritmetico con NULL non restituisce true o false, ma restituisce NULL invece., Quindi, NULL != 'C' restituisce NULL , invece di restituire true.
Qualsiasi confronto aritmetico con 'NULL' restituirà false. Per verificarlo in SQL:
SELECT IF(NULL=123,'true','false')
Per controllare NULL valori che dobbiamo usare IS NULL &IS NOT NULL operatore.