In Oracle you can also write the condition this way, assuming that you know of a value that will NEVER be present in column “field”.
For example, if the column “field” will NEVER contain the value X, you could write the condition as
nvl (field, ‘X’) != ‘C’
which means “if field is null, change it to X, otherwise use the value in field” and “compare the result of the previous expression to the constant C”.
I think the Oracle optimizer will generally find better execution plans with (field is null OR field != ‘C’) rather than (nvl (field, ‘X’) != ‘C’) - UNLESS your DBA has created a function-based index on that table with the expression “nvl (field, ‘X’)” in the function-based index.
It is important to remember that null cannot be compared to a non-null value
The comparison (null = ‘A’) does not return either true or false.
The comparison (null <> ‘A’) does not return either true or false.
The comparison (null = null) does not return either true or false.