开发者

which data type i must choose for boolean type field?

开发者 https://www.devze.com 2023-01-02 03:53 出处:网络
I wanna create a Boolean field in my oracle table but I seen there is no boolean or byte data type so,which one of the oracle data type I must choose for a boolean value?

I wanna create a Boolean field in my oracle table but I seen there is no boolean or byte data type so,which one of the oracle data type I must choose for a boolean value?

answer: I find how Oracle developer do this by wisard:

CREATE TABLE TABLE17
(
  COLUMN1 CHAR(1 BYTE) 开发者_运维问答NOT NULL,
  COLUMN2 VARCHAR2(4000)
)
;


if you are looking for "y" or "n" you can use CHAR(1)


You can use char(1) or number(1)

If you use number(1), set 0-False and 1-True as many programming languages 1 & 0 for Boolean

0

精彩评论

暂无评论...
验证码 换一张
取 消