Previous Topic: Non-zero Return ValuesNext 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, the COPY function creates a new table. If the target table exists, it is deleted and recreated with the new table structure and data.

COPY 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.