I am executing a MySQL query :-
SELECT *
FROM mytable
WHERE name LIKE '%D%'
AND id!='1'
It returns 1 result :-
name : Deepak
id: 2
username: NULL
It is working fine.
Problem is here.. :-
SELECT *
FROM mytable
WHERE name LIKE '%D%'
AND id!='1'
AND username!='d'
It returns 0 result , although username is null in mytable , but still it doesn't return the row of "Deepak" , as it returned in former query.
Please could you explain , why is it happening?