Loading tables with special column types by using generated LOAD statements
When you run the UNLOAD utility or the REORG utility with the UNLOAD EXTERNAL or DISCARD option, DB2® generates a LOAD statement for the unloaded data. You can then use this LOAD statement to load the unloaded data into any table that has a compatible format.
About this task
However, because the following types of columns can contain generated values, they need special consideration:
- ROWID columns
- Identity columns
- Row change timestamp columns
Row-begin
and row-end columns
- Transaction-start-ID columns
For these table column types, the generated LOAD statement contains dummy fields. The following table lists those dummy fields.
| Source table column type | Dummy fields in the generated LOAD statement |
|---|---|
| ROWID with GENERATED ALWAYS | DSN_ROWID |
| Identity column with GENERATED ALWAYS | DSN_IDENTITY |
| Row change timestamp column with GENERATED ALWAYS | DSN_RCTIMESTAMP |
Row-begin
and row-end columns![]() |
DSN_ROWBEGIN
and DSN_ROWEND ![]() |
| Transaction-start-ID columns | DSN_TRANSACTIONSTID |
Procedure
To load tables with special column types by using generated LOAD statements