BOOLEAN

The BOOLEAN data type stores a logical value, TRUE or FALSE.

Syntax

BOOLEAN

Usage

Boolean data types have two possible values: TRUE (1) and FALSE (0). Variables of this type can be used to store the result of a boolean expression.

The BOOLEAN type can be used to define variables used in SQL statements, and can store values of database boolean columns.

While IBM® Informix® SQL boolean type accepts the 't' and 'f' values, the boolean type expects 0/FALSE and 1/TRUE integer values only. You can however insert / fetch a boolean variable into/from a boolean column.

FUNCTION checkOrderStatus( cid )
  DEFINE oid INT, b BOOLEAN
  LET b = ( isValid(oid) AND isStored(oid) )
  IF NOT b THEN
    ERROR "The order is not ready."
  END IF
END FUNCTION