다들 아실거라 생각되지만 모르는분도 계실것같아서 옮겨봅니다.
두번째방법처럼 Domain을 사용하는것이 괜찮은것같네요..
InterBase does not have a native Boolean data type. How can I create one myself?
Declare a field of type CHAR and use CHECK CONSTRAINTS to limit the values that are allowed to be entered into it.
Example:
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.
Example:
CREATE DOMAIN YESNO AS CHAR(1) CHECK (VALUE IN ("Y","N")) NOT NULL;
|