Re: Boolean datatype in Oracle?

From: Alan <alanshein_at_spambuster.erols.com>
Date: Tue, 21 Nov 2000 11:25:15 -0500
Message-ID: <8ve7kp$9vv$1_at_bob.news.rcn.net>


Just use a CHAR(1) and use a CHECK constraint to limit the entries to Y and N or 1 and 2, or whatever.

"Robert Martin" <rwmartin_at_sisconet.com> wrote in message news:8vc26606o7_at_enews3.newsguy.com...
> Well, I am converting an SQL Server 7.0 database to an Oracle 8i database
> and just want to convert things as best as I can.
>
> -------------------------------------------
> Robert Martin (rwmartin_at_sisconet.com)
> Design Engineer
> SISCO Inc,
> 6605 19 1/2 Mile Road
> Sterling Heights, MI 48314-1408
> Phone : 810-254-0020 (ext 125)
> Fax : 810-254-0053
> "Frank van Bortel" <fbortel_at_home.nl> wrote in message
> news:3A22C203.91062EB1_at_home.nl...
> > IMHO you don't need one - just compare a column value with a literal;
> > the outcome is boolean:
> > WHERE <column_name> = <literal>
> >
> > Robert Martin wrote:
> >
> > > What is the best way in an Oracle database to represent a Boolean
 value
 for
> > > a column in a table? I see there is no simple Boolean datatype (which
 I
 find
> > > to be pretty lame IMO). Thanks in advance.
> > >
> > > -------------------------------------------
> > > Robert Martin (rwmartin_at_sisconet.com)
> > > Design Engineer
> > > SISCO Inc,
> > > 6605 19 1/2 Mile Road
> > > Sterling Heights, MI 48314-1408
> > > Phone : 810-254-0020 (ext 125)
> > > Fax : 810-254-0053
> >
> > --
> > Gtrz,
> >
> > Frank van Bortel
> >
> >
>
>
Received on Tue Nov 21 2000 - 17:25:15 CET

Original text of this message