Topic group Related topics
Makes a copy of a table.
COPY TABLE <source tablename> TO <target tablename>
[[TYPE] PARADOX | DBASE]
<source table name>
The name of the table that you want to copy. You can also copy a table in a database (defined using the BDE Administrator) by specifying the database as a prefix (enclosed in colons) to the name of the table, that is, :database name:table name. If the database is not already open, dBASE Plus displays a dialog box in which you specify the parameters, such as a login name and password, necessary to establish a connection to that database.
<target table name>
The name of the table you want to create. The table type is the same as the source table. If you copy a table in a database, you must specify the same database as the destination of the target table.
[TYPE] PARADOX | DBASE
Specifies the default extension for the both the source table and target table: .DB for Paradox and .DBF for dBASE. This overrides the current setting of DBTYPE. You cannot change the table type during the copy; this clause is useful only when using filenames that do not have extensions.
Use the COPY TABLE command to make a copy of a table, including all its index, memo, and other associated files, if any. Unlike the COPY command, the table does not have to be open, and an exact copy of all the records is always made.
Use the Database objectís copyTable(†) method.