How can I do this
select * from theuser where userid=1233 and active != 1
in a correct MySQL syntax?
active
can be NULL
, 0
or 1
and what I need is active
equal to NULL
or 0
, never equal to 1
.
select * from theuser where userid=1233 and (active is null or active != 1)
SELECT *
FROM theuser
WHERE userid = 1233
AND (active IS NULL OR active != 1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With