How to: |
The COALESCE operator can take 2 or more arguments. The first argument that is not NULL is returned. If all arguments are NULL, NULL is returned.
COALESCE(arg1, arg2, [ ... argn ])
where:
Any type
Are data values. The types of the arguments must be compatible.
This operator returns the compatible type of the arguments.
This example,
COALESCE('A', 'B')
return A.
This example,
COALESCE(NULL, 'B')
return B.
This example,
COALESCE(NULL, NULL)
return NULL.
iWay Software |