The NULLIF SQL function returns a null value for expression1 if it is equal to expression2. It is useful for converting values to null from applications that use some other representation for missing or unknown data. The NULLIF scalar function is a type of conditional expression.
SYNTAX
NULLIF (expression1, expression2)
EXAMPLE
SELECT COMPANYNAME,
ZIPCODE,
NULLIF(ZIPCODE, '94103')
FROM CUSTOMERS;
No comments:
Post a Comment