简体   繁体   中英

How to use Booleans with Delphi XE2 dbExpress and Firebird 2.5

使用布尔字段时,新的XE2 dbExpress是否仍有问题?

The best way is to use a domain

CREATE DOMAIN BOOL AS
SMALLINT
DEFAULT 0
CHECK (value in (0,1) or value is null);

Regards

AFAIK Firebird没有BOOLEAN类型。

Create a Char(1) field. Set values "Y" or "N"

http://www.firebirdfaq.org/faq12/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM