mysql - SQL BUG doesn't accept null when write != -
this question has answer here:
- why in sql null can't match null? 9 answers
when write column!=something doesn't choose null value , something. why happened? can prevent writing , column null?
you need check null
too.
select * your_table column <> or column null
note: cannot compare null
null
.
let's @ following code snippets:
set @v := null; select @v = null; result: null; because null can compared using null select @v null; result: 1 (i.e. true)
the null value can surprising until used it. conceptually, null means “a missing unknown value” , treated differently other values.
to test null, use null , not null
Comments
Post a Comment