Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Boolean data type?
btw, the dbms_job package (the broken function..) ask to imput a boolean (broken in boolean).. what should I put? "TRUE","FALSE","T","F","Y","N" or....
Winnie
Ed Bruce wrote in message <36002979.EA04097F_at_ha.hac.com>...
>"David R. Robison" wrote:
>>
>> What is the best way to store a boolean data type in an Oracle database?
>
>I can't say there is any best way. How are you interfacing to your
>database? What programming language? How will you be manipulating the
>results? There are lots of choices.
>
>number(1) with values of 0 and 1. Put a check on column restricting
>values.
>
>char(1) and restrict to 'T' or 'F'
>
>varchar2(5) and set to 'True' or 'False' more user readable.
>
>I prefer the first and third because we use Pro*Ada and have enumerated
>types and can easily convert to a numeric or string representation as
>neccessary. We use number(1) to save space and varchar2 when the data
>may be used with MS Access and a more user readable form is needed.
>
>later,
>Ed Bruce
>Systems Engineer
>Raytheon Systems Company
Received on Wed Sep 16 1998 - 00:00:00 CDT
![]() |
![]() |