Quick
Ref.
Functions
- date
- number
- string
Data Types
- date
- number
- string
|
Compatibility
| NULLIF(f1, f2) |
| Engine |
OK |
Alternative |
| mysql |
yes |
|
| oracle |
yes |
|
| postgres |
yes |
|
| sqlserver |
yes |
|
NULLIFNULLIF returns NULL if the two arguments are equal; otherwise NULLIF
returns the first argument.
NULLIF(x,y) = NULL if x=y
NULLIF(x,y) = x if x != y
NULLIF can be used to replace a specific value with NULL.
In this example the party Lab is replaced with NULL.
|
Results
|
See also: | |