Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> select with Null

select with Null

From: Raj Gopalan <raj.gopalan_at_netdecisions.co.uk>
Date: Wed, 22 Nov 2000 17:31:18 -0000
Message-Id: <10688.122742@fatcity.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US