我有表(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