Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: help on date column
Meng Kiat TAN wrote:
>
> Hi,
> I have created an index for a date column in a table. This
> column is nullable. How do I form up a query so that this
> query will make use of the index ? I need to select
> all the rows which have the date field null.
>
> select col1, col2 from table_a where sdate is null;
>
> This does not make use of the index. So is there a way
> to avoid doing a full table scan?
>
> Thanks & regards!
NULL values aren't stored in the index. You can't look for null values using an index, regardless of the datatype. Received on Thu Sep 25 1997 - 00:00:00 CDT
![]() |
![]() |