Variable initialization values

When a variable is defined, it is automatically initialized by the runtime system to a default value. The default value the variable is assigned with depends on the data type.

Table 1. data type specific default values for variables
data type Default Value
CHAR NULL
VARCHAR NULL
STRING NULL
INTEGER Zero
SMALLINT Zero
FLOAT Zero
SMALLFLOAT Zero
DECIMAL NULL
MONEY NULL
DATE 1899-12-31 (= Zero in number of days)
DATETIME NULL
INTERVAL NULL
TEXT NULL, must use LOCATE
BYTE NULL, must use LOCATE