RE: Indexing NULL in the Oracle Database, is this the best practice?
- From: "Reen, Elizabeth " <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "elizabeth.reen" for DMARC)
- To: "'jcdrpllist@xxxxxxxxx'" <jcdrpllist@xxxxxxxxx>, ORACLE-L <oracle-l@xxxxxxxxxxxxx>
- Date: Thu, 29 Dec 2016 17:05:30 +0000
Null cannot be indexed by itself. It can be indexed as the second column of an
index. So you could index emp_num, date_of_birth. Since everyone has a
birth date, I would make the column not null and solve the problem that way. If
birth date is optional, you can still index the column. It will just not get
the rows which are null.
Liz Reen
Long suffering DBA
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On ;
Behalf Of Juan Carlos Reyes Pacheco
Sent: Tuesday, December 27, 2016 9:24 AM
To: ORACLE-L
Subject: Indexing NULL in the Oracle Database, is this the best practice?
Hello, please :)
CREATE INDEX emp_dob ON employees (date_of_birth, '1')
http://use-the-index-luke.com/sql/where-clause/null/index<https://urldefense.proofpoint.com/v2/url?u=http-3A__use-2Dthe-2Dindex-2Dluke.com_sql_where-2Dclause_null_index&d=DQMFaQ&c=j-EkbjBYwkAB4f8ZbVn1Fw&r=yWMFosURAngbt8VLeJtKLVJGefQxustAZ9UxecV7xpc&m=9lPbhytWad3njvs48qFMux-o0SZ_wOBHeQ_SfNDiQ8o&s=Av9Km_3UEKtzLeR28l5HjmGH2htxR21iEJ8Uupxcdzc&e=>
Other related posts:
- » Indexing NULL in the Oracle Database, is this the best practice?- Juan Carlos Reyes Pacheco
- » RE: Indexing NULL in the Oracle Database, is this the best practice?- Mark W. Farnham
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Mladen Gogala
- » RE: Indexing NULL in the Oracle Database, is this the best practice? - Reen, Elizabeth
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Sayan Malakshinov
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Luis Santos
- » RE: Indexing NULL in the Oracle Database, is this the best practice?- Reen, Elizabeth
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Mladen Gogala
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Sayan Malakshinov
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Sayan Malakshinov
- » RE: Indexing NULL in the Oracle Database, is this the best practice?- Reen, Elizabeth
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Michael D O'Shea/Woodward Informatics Ltd
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Mladen Gogala
- » RE: Indexing NULL in the Oracle Database, is this the best practice?- Reen, Elizabeth
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Michael D O'Shea/Woodward Informatics Ltd
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Lothar Flatz
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Mladen Gogala
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Mladen Gogala
- » Re: Indexing NULL in the Oracle Database, is this the best practice?- Michael D O'Shea/Woodward Informatics Ltd
- » RE: Indexing NULL in the Oracle Database, is this the best practice?- Reen, Elizabeth