Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 62 Insurance
- 536K On-Premises Infrastructure
- 138.2K Analytics Software
- 38.6K Application Development Software
- 5.7K Cloud Platform
- 109.4K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.2K Integration
- 41.6K Security Software
New type BOOLEAN
Comments
-
Boolean:
Varchar(1) = '1' True, '0' False
Bool1 * Bool2 = IF Bool1 AND Bool2
Multilingual
Can readapt the concept of Boolean
Efficiency vs Number(1) 1|0
Can use a default value (1|0) as not explicit value
-
As Chris Date pointed out: Boolean is a fundamental datatype. In fact, it's the only fundamental datatype. A database just supporting boolean as a datatype could function perfectly (though it wouldn't be very useful). It's just not explicable why SQL (or any other relational database language) is full of expressions yielding a boolean result (to be precise: a three-valued boolean) yet these cannot be stored in the database. It's a clear violation of the principle of closure which is one of the key features of relational databases and relational database languages.
ANSI-SQL99 finally included Boolean (though in a crippled way). Better late than never.
Boolean is absolutely the most desired but unsupported datatype in Oracle database. If it were present, it would probably rank 3rd or 4th in the list of most used datatypes (after VARCHAR2, NUMBER and possibly DATE, but before the many more obscure datatypes which are supported).
-
Absolutely agree, this is a must have. There is no standard way for defining binary values in the database, and you are unable to call plsql procedures with boolean parameters from sql.
-
This is a no-brainer. Just add it.
We don't care how it is stored internally, or what hoops one has to jump through to use it, "where COL=true|false|is null|is not null" is fine. Just fine. I don't need any dangling syntax, "where COL".
Just for the ability to call PL/SQL, instead of having to wrap and overload each and every possible combo, this needs to be added to the SQL-engine.
-
Agree, this is that basic that is surprising that oracle prioritize much secondary features. Any developer has to deal with this daily and make workarrounds for avoid this limitations.