phpmyadmin - MySQL (mariadb) strange VARCHAR WHERE NULL behaviour -
this question has answer here:
- mysql: selecting rows column null 7 answers
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
Post a Comment