🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #11168

Re: BOOLEAN

#11168
From: T Fehr
Date: Fri, 06 Dec 2002 14:08
15 lines
1560 bytes
Use a Char(1) field and put a check constraint on it so it will only allow
either a 'T' or 'F'.  You can also define it as NOT NULL and set the DEFAULT
to 'F'.  If you decide to create a DOMAIN for it don't call it BOOLEAN (I
use LOGICAL) or you will have problems migrating your database to newer
versions of IB.

CREATE DOMAIN LOGICAL AS
CHAR(1) CHARACTER SET ISO8859_1
DEFAULT 'F'
NOT NULL
CHECK (VALUE IN ('T', 'F'))
COLLATE ISO8859_1

Best Regards,
Terry Fehr
Technical Details
Message-ID: <3df0af6c$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!proxad.net!proxad.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3df0a5bb@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,c7f065d637216af9
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-06 06:10:26 PST
Reply-To: "T Fehr" <nospam@hotmail.com>
From: "T Fehr" <nospam@eliaswoodwork.com>
Newsgroups: borland.public.interbase.sql
References: <3df0a5bb@newsgroups.borland.com>
Subject: Re: BOOLEAN
Date: Fri, 6 Dec 2002 08:08:43 -0600
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 216.55.203.123
Message-ID: <3df0af6c$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1039183724 216.55.203.123 (6 Dec 2002 06:08:44 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!proxad.net!proxad.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail