Overview
ANULL value indicates that the value does not exist in the database. In Oxla, you can use the NULL option in the COPY TO state to specify a string that will replace NULL values when copying data from the table to a CSV file.
Syntax
The syntax for using theNULL option in the COPY TO is as follows:
table_name: The table containing the data to be exported.file_path: A CSV file location where the data will be saved.NULL ‘replacement_string': The specified string that will replace NULL values in the exported CSV file. The default value is' '.
Example
- Create a table with a
NULLvalue.
- Now, let’s use
COPY TOwith an empty string:
- The
NULLvalues in the table are replaced with the empty string in the CSV file.
You can specify another string to replace the null value, such as blank, empty, invalid, etc.