Boolean Data Type

Vertica provides the standard SQL type BOOLEAN, which has two states: true and false. The third state in SQL boolean logic is unknown, which is represented by the NULL value.

Syntax

BOOLEAN

Parameters

Valid literal data values for input are:

 

TRUE
't'
'true'
'y'
'yes'
'1' 
 1
FALSE
'f'
'false'
'n'
'no'
'0'
 0

Notes

  • Do not confuse the BOOLEAN data type with Boolean Operators or the Boolean-Predicate.
  • The keywords TRUE and FALSE are preferred and are SQL-compliant.
  • A Boolean value of NULL appears last (largest) in ascending order.
  • All other values must be enclosed in single quotes.
  • Boolean values are output using the letters t and f.