NULLIF: NULLIF Operator

How to:

The NULLIF operator returns NULL if its two arguments are equal. Otherwise, the first argument is returned.

Syntax: How to Use the NULLIF Operator

NULLIF(arg1, arg2)

where:

arg1, arg2

Any type

Are data values. The types of the two arguments must be compatible.

This operator returns the compatible type of the arguments.

Example: Using the NULLIF Operator

NULLIF operator returns NULL if two values are equal. This example,

NULLIF(IDNUM, -1)

returns NULL if the identification number is -1, otherwise it returns the number.

WebFOCUS

Feedback