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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How can I store a boolean data type in a table or data type object?

Re: How can I store a boolean data type in a table or data type object?

From: <gmei_at_my-deja.com>
Date: Sat, 19 Feb 2000 19:35:00 GMT
Message-ID: <88mr94$488$1@nnrp1.deja.com>


In article <b5qr4.2334$Z11.32773_at_dfiatx1-snr1.gtei.net>,   "Rookie" <Rookie.Programmer_at_gte.net> wrote:
> I would like to store a boolean data type in a table. Do I use an int, 0
> for false and 1 for true, or do I use a char(1) or varchar2(1), 'N' for
> false and 'Y' for true?
>
>

I would say using char(1), and put check constraint so that the only values are 'Y' and 'N'. Integer type takes more bytes.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Feb 19 2000 - 13:35:00 CST

Original text of this message

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