VALUE(x,y,...) is a
special function that can be used to replace NULL values with a non-NULL value.The arguments of the VALUE function must be comparable. The arguments are evaluated one after the other in the specified order.
Result of the VALUE(x,y,...) function |
|
One of the arguments is a non-NULL value |
The first non-NULL value that occurs |
Each argument is a special NULL value |
Special NULL value |
Each argument is a NULL value |
NULL value |
Model table:
The title does not occur in the output list. The word
COMPANY is to be output for companies in the FIRSTNAME column instead of a NULL value.SELECT VALUE(firstname, 'COMPANY') firstname, name FROM customer