SQL/MySQL NOT NULL vs NOT EMPTY -


i'd limit query show rows field not empty. found this thread posed same question , told use is not null. tried that, i'm still getting rows field empty.

what correct way this? null same thing empty in sql/mysql?

my query, if you're interested is: select * records (party_zip='49080' or party_zip='49078' or party_zip='49284' ) , partyfn not null

when comparing null value, result in cases becomes null , therefor haves same result 0 (the false value in mysql) inside where , having.

in given example, don't need include is not null. instead use party_zip in ('49080', '49078', '49284'). null can't 49080, 49078, 49284 or other number or string.

what need think though, when checking empty values. !party_zip won't return true/1 if value null. instead use or columns null or !coalesce(party_zip, 0)


Comments