Re: Boolean datatype in Oracle?

From: Frank van Bortel <fbortel_at_home.nl>
Date: Tue, 21 Nov 2000 19:22:16 GMT
Message-ID: <3A240618.2D21C13C_at_home.nl>


Or, if you happen to have a non-mandatory column: Y and NULL (or N and NULL - whichever your default value)

Alan wrote:

> 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
> > >
> > >
> >
> >

--
Gtrz,

Frank van Bortel
Received on Tue Nov 21 2000 - 20:22:16 CET

Original text of this message