Vertica Analytics Platform Version 9.2.x Documentation

NULL Value

NULL is a reserved keyword used to indicate that a data value is unknown. It is the ASCII abbreviation for NULL characters (\0).

Usage in Expressions

Vertica does not treat an empty string as a NULL value. An expression must specify NULL to indicate that a column value is unknown.

The following considerations apply to using NULL in expressions:

  • NULL is not greater than, less than, equal to, or not equal to any other expression. Use the Boolean-Predicate to determine whether an expression value is NULL.
  • You can write queries with expressions that contain the <=> operator for NULL=NULL joins. See Equi-Joins and Non Equi-Joins in Analyzing Data.
  • Vertica accepts NULL characters ('\0') in constant strings and does not remove null characters from VARCHAR  fields on input or output.

Projection Ordering of NULL Data

Vertica sorts NULL values in projection columns as follows:

Column data type NULL values placed at...
NUMERIC
INTEGER
DATE
TIME
TIMESTAMP
INTERVAL
Beginning of sorted column (NULLS FIRST)
FLOAT
STRING
BOOLEAN
End of sorted column (NULLS LAST)