我写了一个非常简单的查询
select *, "Status" from "ABC" WHERE "ABCId" = 7; // Got 100 rows
ABC表有一些列,其中之一是“状态”,空值通常显示为(Null)。
当我尝试这些查询时
-- 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%'
我没有得到任何行,感到很困惑,这是一个简单的查询 :/
AND status IS NULL
- JB NizetOR
:AND status IS NULL OR status <> 'success'
。 - JB Nizet