Returns the first non-NULL expression from a list of expressions.
firstnonnull ( expression [,...] )
expression | All expressions must be of the same datatype. |
Returns the first non-NULL expression from a list of expressions. The function takes arguments of any datatype, but they must be all of the same datatype. The function returns the same datatype as its argument. This function behaves exactly like coalesce().
firstnonnull (NULL, NULL, 'examplestring', 'teststring', NULL) returns 'examplestring'.