The NULL Character String

Only columns for which NULL has been specified in the create table statement and into which you have explicitly entered NULL, or into which no data has been entered can contain null values.

Do not enter the character string “NULL” (with quotes) as data for a character column. Use “N/A” or “none” or a similar value instead.

To explicitly insert NULL into a column, use:

values({expression | null} 
     [, {expression | null}]...)

The following example shows two equivalent insert statements. In the first statement, the user explicitly inserts a NULL into column t1. In the second, SAP ASE provides a NULL value for t1 because the user has not specified an explicit column value:

create table test 
(t1 char(10) null, t2 char(10) not null) 
insert test 
values (null, "stuff") 
insert test (t2) 
values ("stuff") 

NULL Is Not an Empty String

The empty string (“ ”or ‘ ’) is always stored as a single space in variables and column data. This concatenation statement is equivalent to “abc def”, not “abcdef”:

"abc" + "" + "def" 

An empty string is never evaluated as NULL.