By: Borland Staff
Abstract: Booleans can be simulated by created a CHAR(1) with a check contraint that allows Y or N to be entered
InterBase does not have a native Boolean/Logical datatype.
How can I create one myself?
Create a field of type CHAR and use CHECK CONSTRAINTS to limit
the values that are allowed to be entered into it.
CHAR(1) CHECK (VALUE IN ("Y", "N")) NOT NULL;
Similar to above but use a domain to create a global data type for
the database so that you may reuse the data type more easily.
CREATE DOMAIN YN AS CHAR(1) CHECK (VALUE IN ("Y","N")) NOT NULL;
Trial Download Week!
Click here to download a free 30-day trial of InterBase XE3 Server or ToGo editions. Or download a free non-expiring Developer Edition >
More InterBase Info
InterBase XE3 Product Info
Free Developer Edition download
InterBase on Google+
Follow @InterBase_ on Twitter
Server Response from: ETNASC04