Previous Topic: Non-zero Return Values

Next Topic: DELETE Function—Remove Table

COPY Function—Copy Data Rows

The COPY function copies the structure and data rows of a current table to another table. If the target table does not exist, it is created. If the target table does exist, it is deleted and recreated with the new table structure and data.

The COPY function has the following syntax:

OI ASOTEAPI COPY TABLE(from_table_name) TARGET(to_table_name) SSMPROT(YES|NO)

The SSMPROT keyword determines whether this potentially destructive operation may be performed on an active System State Manager table. A value of YES prohibits this operation. The default is NO, except for the DELETE, DROPCOLS, and RENAME operations.

Note: To copy the columns of a table to another table, use the TRANSFER function.