我有表(Oracle)的数字字段如下NUMBER(10,2)不等于您在甲骨文
TEST_HOURS NUMBER(10,2)
当我尝试以下SQL它不工作
select t.test_hours from test_hours t where
where (t.test_hours != 1 or t.test_hours is not null)
and t.id = 11
当我删除这(t.test_hours != 1 or t.test_hours != null)
它工作正常,但是当我包括上述行然后它不提取数据,并没有error
。
有人可以帮我解决这个问题。
感谢
这种情况似乎毫无意义,即't.test_hours!= 1或t.test_hours!= null'。你想要得到什么? –
您无法与'null'做比较。始终使用'is null'或'not null'。 –
@vkp试过的不是空的,它没有帮助 – SAR