You can use the Loader’s IMPORT COLUMNS command 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.
<import_columns_command > ::= IMPORT COLUMNS TABLE <table_name>
<table_name> ::= table name
<if_condition> ::= selecting data records
<duplicates_clause> ::= REJECT DUPLICATES
| IGNORE DUPLICATES
| UPDATE DUPLICATES
<import_column_spec> ::= column description
<data_instream_column_spec> ::= DATA <instream_columnformat_spec>
<instream_columnformat_spec> ::= data stream
<import_lobcolumn_spec> ::= exporting and importing LONG values
Loader Tutorial, IMPORT COLUMNS
The Loader generates an internal mass INSERT statement from the IMPORT COLUMNS command and then executes it.
During the import operation, all of the tables modified by this IMPORT COLUMNS command can also be read and changed by other database users.
You use the DUPLICATES rule 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 rule is only evaluated if the data is not imported into the database in the PAGES data format.
The new line is rejected with an error message.
Default value: REJECT DUPLICATES
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 of the changes made to the target table(s) as a result have also been written to the log area of the database instance.
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 table’s columns. If not, the Loader reports an error.
If the import operation cannot be completed successfully, the 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.