Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

13.16.3 Specification examples of column structure information files

This section provides specification examples of column structure information files.

Organization of this subsection
(1) Example 1: When a column is deleted
(2) Example 2: When a column is added
(3) Example 3: When the column sequence has been changed

(1) Example 1: When a column is deleted

[Figure]

Specification example of a column structure information file
 
C4
*skipdata*,type=char(4)
C5
 

Explanation
The skipdata statement is specified because the migration destination table does not have the CHAR-type column.

(2) Example 2: When a column is added

[Figure]

Specification example of a column structure information file
 
C3
C5
 

Explanation
Column C4 has been added to the migration destination table. The added column C4 is not described in the column structure information file.
When a column has been added, it is important that it not be specified in the column structure information file. That way, HiRDB detects that the input data does not contain data for that column, and it stores the default or NULL value in the added column. In the case of a table with the FIX attribute, the NULL value cannot be stored, so HiRDB stores the default value if the WITH DEFAULT operand was specified in the ALTER TABLE statement when the column was added.

(3) Example 3: When the column sequence has been changed

[Figure]

Specification example of a column structure information file
 
C5
C4
C6
 

Explanation
Because columns C4 and C5 have been reversed, C5 is specified before C4.