Is there any boolean type in Oracle databases?

Peder picture Peder · Sep 16, 2010 · Viewed 368.3k times · Source

Is there any Boolean type in Oracle databases, similar to the BIT datatype in Ms SQL Server?

Answer

Erich Kitzmueller picture Erich Kitzmueller · Sep 16, 2010

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.

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