BC remote Oracle DBA - Call (800) 766-1884  
Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation








EnterpriseDB: Miscellaneous Types

Oracle Tips by Burleson Consulting


A Boolean value is a
TRUE or FALSE indicator.  The only valid values for BOOLEAN are TRUE, FALSE, and NULL.  NULL does not mean either TRUE or FALSE.  It just means that no value has been set.  You may choose to consider a NULL to be false.

Oracle does not support a Boolean data type (in SQL, it does in PL/SQL).  In Oracle, you would generally store Booleans as either NUMBERs or VARCHAR2s.  For example, you may say that in a given column, a 0 means TRUE and any other number means FALSE or vice versa.  Or maybe 1 means TRUE and any other number means FALSE.  Or maybe 0 means TRUE and 1 means FALSE and any other number is invalid.

If you used a VARCHAR2, you could store the letters "TRUE" or "FALSE".  Of course, you could also store "YES" and "NO".  Or "Y" or "N".  How about "T" or "F"?

Do you see where I'm going with this?  A BOOLEAN is a very basic data type.  When each developer/designer is left to decide how to implement a basic type, hilarity can ensue.

The BOOLEAN data type is defined in the SQL standard (although as an optional type).  EnterpriseDB supports the BOOLEAN standard as defined in the SQL standard.  You may reference an EnterpriseDB BOOLEAN as several values but you should try to stick with the TRUE or FALSE syntax.

CREATE TABLE boolean_table (
  bool_true BOOLEAN,
  bool_false BOOLEAN

INSERT INTO boolean_table (bool_true, bool_false)

SELECT * FROM boolean_table; 

edb=# CREATE TABLE boolean_table (
edb(#   bool_true BOOLEAN,
edb(#   bool_false BOOLEAN
edb(# );

edb=# INSERT INTO boolean_table (bool_true, bool_false)
edb=# SELECT * FROM boolean_table;

 bool_true | bool_false
 t         | f

(1 row) 


This is an excerpt from the book "EnterpriseDB: The Definitive Reference" by Rampant TechPress.

Expert Remote DBA

BC is America's oldest and largest Remote DBA Oracle support provider.  Get real Remote DBA experts, call
BC Remote DBA today.



Remote DBA Service

Oracle Tuning Book


Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software







BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.

Hit Counter