在oracle数据库中有一个布尔类型吗? [英] Is there a boolean type in oracle databases?

查看:792
本文介绍了在oracle数据库中有一个布尔类型吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在oracle数据库中有一个布尔类型,类似于MS SQL中的BIT数据类型。

Is there a boolean type in oracle databases, similar to the BIT datatype in MS SQL?

推荐答案

在SQL的SQL(不是PL / SQL)中缺少布尔数据类型,但是它们对于使用什么没有明确的建议。请参见此主题在asktom。从推荐 CHAR(1)'Y'/'N',他们会切换到 NUMBER(1)0/1 有人指出'Y'/'N'取决于英语,而例如德语程序员可能使用'J'/'N'

Not only is the boolean datatype missing in Oracle's SQL (not PL/SQL), but they also have no clear recommendation about what to use instead. See this thread on asktom. From recommending CHAR(1) 'Y'/'N' they switch to NUMBER(1) 0/1 when someone points out that 'Y'/'N' depends on the English language, while e.g. German programmers might use 'J'/'N' instead.

最糟糕的是,他们保卫这个蠢决定就像他们保护''= NULL 愚蠢。

The worst thing is that they defend this stupid decision just like they defend the ''=NULL stupidity.

这篇关于在oracle数据库中有一个布尔类型吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆