Given the following table:
create table inttest (
someint INT(10) NULL DEFAULT NULL
);
When I insert some random values
insert into inttest
(someint)
values
(1),(2),(3),(1),(2),(NULL);
and execute the request
select *
from inttest
where someint != 1;
MySQL returns 2,3,2, but not NULL. It's right? Should I distribute my query with OR someint IS NULL or is this an error in my MySQL installation?
Geert source
share