DB2 Version 9.7 for Linux, UNIX, and Windows

Boolean values

A Boolean value represents a truth value of TRUE or FALSE. A Boolean expression or predicate can result in a value of unknown, which is represented as the null value.

The BOOLEAN type is a built-in data type that can only be used as the data type of:
  • A local variable in a compound SQL (compiled) statement
  • A parameter of an SQL routine
  • The returns type of an SQL function
  • A global variable
A variable or parameter defined with the BOOLEAN type can only be used in compound SQL (compiled) statements.