Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Index on status field?
<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.
-----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-lReceived on Sat Apr 09 2005 - 05:13:58 CDT
![]() |
![]() |