Isnull Function; Examples Of Isnull - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

ISNULL Function

The ISNULL function returns the value of the first argument if it is not null, otherwise it returns
the value of the second argument. Both expressions must be of comparable types.
ISNULL is a Neoview extension.
ISNULL(ck_expr, repl_value)
ck_expr
an expression of any valid SQL data type.
repl_value
an expression of any valid SQL data type, but must be a comparable type with that of
ck_expr.

Examples of ISNULL

This function returns a 0 instead of a null if value is null.
ISNULL(value,0)
This function returns the date constant if date_col is null.
ISNULL(date_col, DATE '2006-01-01')
This function returns 'Smith' if the string column last_name is null.
ISNULL(last_name, 'Smith')
346
SQL Functions and Expressions

Advertisement

Table of Contents
loading

Table of Contents