Subject Re: Accepted way to handle BOOLEAN value?
Author Adam
--- In firebird-support@yahoogroups.com, "Frank Marousek" <frank@...>
wrote:
>
> I'm new to Firebird, and migrating from a database that has a
BOOLEAN data type. Can someone tell me what is the accepted manner in
which to handle boolean values in Firebird?

The usual way is a domain restricting a base type to two values. The
usual ones are 0/1 based on a smallint field, or 'T'/'F' based on a
char(1) field.

eg.

CREATE DOMAIN BOOLCHAR AS Char(1)
check( (value in ('T','F')) or value is null );

Drop the null condition if you don't want to allow nulls in that domain.

Adam