Attribute or Behavior
|
Null Values
|
SAS Missing Values
|
---|---|---|
internal representation
|
metadata
|
floating point or character
|
evaluation by logical
operators
|
is an unknown value
that is compared by using three-valued logic, whose resolved values
are True, False, and Unknown. For example,
WHERE col1
= null returns UNKNOWN .
|
is a known value that,
when compared, resolves to a Boolean result
|
collating sequence order
|
appears as the smallest
value
|
appears as the smallest
value
|
Column Data Type
|
Nonexistent Data Value
|
Value Returned to the
Application
|
---|---|---|
DOUBLE
|
., ._, or .A - .Z
|
null
|
DOUBLE
|
null
|
null
|
CHAR
|
'␣'
|
'␣'
|
CHAR
|
null
|
null
|
Note: The value '␣'
is a blank space between single quotation marks, which, in ANSI mode,
is a blank space, not nonexistent data.
|
Column Data Type
|
Nonexistent Data Value
|
Value Stored in a SAS
Data Set, SPD Engine Data Set, or SPD Server Table
|
Value Stored in the
ANSI SQL Null Supported Data Source
|
---|---|---|---|
DOUBLE
|
., ._, or .A –
.Z
|
.
|
null
|
DOUBLE
|
null
|
.
|
null
|
CHAR
|
'␣'
|
'␣'
|
'␣'
|
CHAR
|
null
|
'␣'
|
null
|
Note: The value '␣'
is a blank space between single quotation marks, which, in ANSI mode,
is a blank space, not nonexistent data.
|
Column Data Type
|
Nonexistent Data Value
|
Value Returned to the
Application
|
---|---|---|
DOUBLE
|
., ._, or .A –.Z
|
., ._, or .A - .Z
|
DOUBLE
|
null
|
.
|
CHAR
|
'␣'
|
'␣'
|
CHAR
|
null
|
'␣'
|
Note: The value '␣'
is a blank space between single quotation marks, which, in SAS mode,
is nonexistent data.
|
Column Data Type
|
Nonexistent Data Value
|
Value Stored in a SAS
Data Set, SPD Engine Data Set, or SPD Server Table
|
Value Stored in the
ANSI SQL Null Supported Data Source
|
---|---|---|---|
DOUBLE
|
., ._, or .A - .Z
|
., ._, or .A - .Z
|
null
|
DOUBLE
|
null
|
.
|
null
|
CHAR
|
'␣'
|
'␣'
|
'␣'
|
CHAR
|
null
|
'␣'
|
'␣'
|
Note: The value '␣'
is a blank space between single quotation marks, which, in SAS mode,
is nonexistent data.
|
IFNULL(expression, return_value_if_null_expression)If the value of expression is null, the function returns the value of return_value_if_null_expression.
select bookName when ifnull(numCopies, 'T') = 'T';
NULLIF(expression, test_value_expression);
update books set numCopies = nullif(numCopies, –1);