Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can I store a boolean data type in a table or data type object?
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
![]() |
![]() |