Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> select with Null
Hello list,
I have a query
select d.discount_type
from discount d
where (d.company_code = 'XX' or
d.company_code is null) and (d.operator_code = 'YY' or d.operator_code is null)
Apparently, oracle is not using the index since I am using IS NULL. But the functional requirement is such that the query need to consider records even if company_code, Operator_code ,... is null.
Any thoughts on how do I modify this query so that the index is being used. Received on Wed Nov 22 2000 - 11:31:18 CST