Swapping a table (SWAP TABLE statement)
The table name exchange in table swapping exchanges the table's relationship with DSO. Use the SWAP TABLE
statement for table swapping. This produces the following effects:
· Data can be transfered in a short time.
· An application program need not be changed.
· Previous views and routines can be used without changing their definitions.
An example of table swapping follows.
Example:
This example shows table swapping when the data for each day is shifted to the day before in a
system managing data by days. For a new day, data is initialized.
To add a table DSO definition after adding the table definition, use the CREATE DSO statement. An example of adding
a table DSO definition follows. For details about how to specify the CREATE DSO statement, see 2.7 "Defining a
Storage Structure."
Example:
Add STOCK_DSO as the DSO of the STOCK table.
123