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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Index on status field?

RE: Index on status field?

From: Lex de Haan <lex.de.haan_at_naturaljoin.nl>
Date: Sat, 9 Apr 2005 11:09:58 +0200
Message-Id: <20050409090958.A9D8EB000577@smtp-out2.tiscali.nl>


<soap box>
... and of course, while using this trick,
we all realize that we are not supposed to use nulls to represent a value ;-) so if you like "correct" SQL results under all circumstances, you'll probably need some SQL functions here and there in your code. indeed, *not* in the create index statement, and *not* in the constraint definition,
but those two statements you typically perform only once... </soap box>

ah, that felt good ...
cheers,

Lex.  



Visit my website at http://www.naturaljoin.nl

-----Original Message-----

... all you need to do is go from Y/N to Y/NULL and you don't need to use the
FBI nor do you need the awkward WHERE clause like (DECODE(temporary, 'Y', 'Y', NULL)) ... I prefer Y/NULL with a check constraint that makes sure those are the only valid values.

S-

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Apr 09 2005 - 05:13:58 CDT

Original text of this message

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