|
isnull()
The
System Function
isnull()
replaces the
NULL value
in expression_1 with another value, specified in expression_2. This system function
can be executed by any user.
Syntax of the System Function isnull()
isnull(expression_1, expression_2)
The parameters of the System Function isnull()
"expression_1" and "expression_2"
The parameters "expression1" and "expression1"
can be column names,
constants,
variables
or
expressions.
They can be of any
datatype.
The datatypes must be
implicitly convertible
If this is not possible, the function
convert
can be used to convert one datatype into another. Usually, the parameters are specified
with column names. They must be set in quotes.
Example for the System Function isnull()
select isnull("column_name", "replace_expression")
from table_name
go
-----
replace_expression
For all
NULL
values
in the column column_name of the
table
table_name, the function returns the value replace_expression.
See also:
ASE T-SQL - Aggregate Functions, audit_event_name(), col_length(), col_name(), curunreservedpgs(), datachange(), datalength(), data_pages(), data_pgs(), db_id(), db_name(), host_id(), host_name(), identity(), index_col(), index_colorder(), lct_admin(), license_enabled(), lockscheme(), next_identity(), object_id(), object_name(), pagesize(), pointer_size(), ptn_data_pgs(), reserved_pages(), reserved_pgs(), rowcnt(), row_count(), showplan_in_xml(), syb_sendmsg(), syb_sendmsg(), System Functions, tempdb_id(), tran_dumpable_status(), tsequal(), used_pages(), used_pgs().
|