You may want to extract data for use in other software products. Because the other software products may not understand NULL values, there are two ways to specify how NULL values appear when using the OUTPUT statement from Interactive SQL:
the output_nulls option lets you specify the output value used by the OUTPUT statement
the IFNULL function lets you apply the output value to a particular instance or query
Both options allow you to output a specific value in place of a NULL value. By specifying how NULL values are output, you have greater compatibility with other software products.
Execute a SET OPTION statement that changes the value of the output_nulls option to the desired value.
The following example changes the value that appears for NULL values to (unknown):
SET OPTION output_nulls = '(unknown)';
For more information about setting Interactive SQL options, see SET OPTION statement.
TipYou can change the value that appears in place of a NULL value on the Interactive SQL Results pane. From the Tools menu, choose Options. On the Results tab of the Interactive SQL Options dialog, configure the Display Null Values As value. |