Background documentationIMPORT COLUMNS Command Locate this document in the navigation structure


You can use the Loader command IMPORT COLUMNS to control the import of application data into a table.


The table exists in the database. Otherwise it must be created before the IMPORT COLUMNS command is executed. You have either exported the required data with the corresponding EXPORT command or the data is available in the specified data format.


Syntax Syntax

  1. <import_columns_command> ::=
      IMPORT COLUMNS TABLE <table_name>
        <import_column_spec> ... <data_instream_column_spec>Column description
    <duplicates_clause> ::=
    <data_instream_column_spec> ::=
      DATA <instream_columnformat_spec> [<import_lobcolumn_spec> ...]
    <package_spec> ::=
      PACKAGE <oustream_csv_spec>
End of the code.

Loader generates an internal mass INSERT statement from the IMPORT COLUMNS command and executes it. During the import operation, all the tables modified by this IMPORT COLUMNS command can also be read and changed by other database users.


You use the DUPLICATES clause to specify how to proceed when importing data from a data stream if a row with the same key as the new row already exists in the table. This clause is not evaluated if the data is imported into the database in PAGES format.


The new line is rejected with an error message (default value).


The new line is not inserted.


The new line overwrites the existing line.


The data in the data stream has been imported to the target table(s). All the changes made to the target table(s) have been written to the log area of the database instance.

Note Note

You use either the command IMPORT COLUMNS TABLE * ... DATA ... or the command IMPORT TABLE ... DATA ... to import all the application data of a table. The corresponding data stream must contain data for all the columns of the table. If not, Loader reports an error.

End of the note.

Errors: If the import operation cannot be completed successfully, Loader logs the last row that was successfully inserted in the table, the number of rows inserted, and the number of rows rejected in the log file.


Loader Tutorial, IMPORT COLUMNS