phpmyadmin - MySQL (mariadb) strange VARCHAR WHERE NULL behaviour -


this question has answer here:

i have table like:

id    name (varchar) -------------------------- 1     test 2     3     null 4     test 

when query

select * table name != 'some'; 

i result:

id    name -------------------------- 1     test 4     test 

why doesn't return rows name == null ?

server version: 5.5.31-mariadb-1~squeeze-log - mariadb.org binary distribution (protocol version 10)

client version: libmysql - 5.1.66 (mysqli) protokoll-version: 10

because comparing null results in unknown. have use is operator.

select * table name != 'some'  or    name null 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -