In SQL, a record must include a value if a column is declared
as not null. When a record contains no value for a column, the column
is considered to be null. The system provides an explicit and implicit
method for conveying nullness.
- The explicit method includes a specific token in the field instead
of a value. By default, this token is the word “null” (not case-sensitive).
You can use the nullValue option to change this token
to any other 1 - 4 character alphabetic token. You can precede or
follow an occurrence of the explicit null token in a non-string field
with adjacent spaces. For the system to recognize an explicit null
token in a string field, the token cannot have preceding or trailing
adjacent spaces. The explicit null token method makes it impossible
to express a string that consists of exactly the text of the null
token.
- The implicit method interprets an empty field as null. This method
is always available to non-string fields independent of any nullValue option
setting and works even if the non-string field contains spaces. You
can use the implicit method on string fields only if you set the nullValue option
to the empty string ('').
The system considers a string field empty
(potentially null) only if it contains truly zero characters (no spaces).
Setting nullValue to the empty string makes it impossible
to set any character varying (alias varchar(n)) column to an empty,
zero-length string. In other words, if the system encounters an empty
string and the nullValue is set to '', then the system
treats the empty string as a null value.