I have a table with the following possible values for the column field_value.
But when I try to select all values which are not 'CB', the query result also ignores all NULL values.
Why does this happen?
mysql> select distinct field_value from TableName;
+--------------+
| field_value |
+--------------+
| S |
| NULL |
| CA |
| CB |
+--------------+
4 rows in set (6.32 sec)
mysql> select distinct field_value from TableName where field_value!='CB';
+--------------+
| field_value |
+--------------+
| S |
| CA |
+--------------+
2 rows in set (0.15 sec)
mysql>