Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Booleans
Inasmuch as Oracle 8.0x and below has no boolean datatype, you only have two choices:
number(1) for 0 or 1
or
varchar2(1) for 'Y' or 'N'.
In my instances, I do some recency/frequency counts on some fields, so I use
the NUMBER datatype
which eliminates the need to do TO_NUMBER when summing.
On other fields, like OK_TO_MAIL, I use VARCHAR2(1) with 'Y' or NULL.
Note that in this case, I use NULL instead of 'N' (only populating the
field with a NULL or a 'Y')
because the NULL will not be included in the index.
"Sandro PIAZZINI" <sandro.piazzini_at_programmer.net> wrote in message
news:8qaqj4$7gq$1_at_news6.isdnet.net...
> Hello,
>
> What is the best datatype to treat Booleans (like Yes/No fields)
>
>
Received on Wed Sep 20 2000 - 00:00:00 CDT
![]() |
![]() |