I've written a very simple query
select *, "Status" from "ABC" WHERE "ABCId" = 7; // Got 100 rows
ABC table has some columns one of them is "Status" with null value usually appearing as (Null)
When I try these queries
-- 1
select * FROM "ABC" where "ABCId" = 7 AND "Status" <> 'success'
-- 2
select * FROM "ABC" where "ABCId" = 7 AND "Status" != 'success'
-- 3
select * FROM "ABC" where "ABCId" = 7 AND "Status" NOT ILIKE '%success%'
I'm not getting any rows, I bang my head, this is a simple query :/
You can use the null safe comparison operator is distinct from:
and "Status" is distinct from 'success'
that will be true for null values as well.
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