COPY STRUCTURE Command Example

In the following example, the customer table is opened, its structure is copied to a table called backup and backup is opened. APPEND FROM then appends records to the backup table from the customer table, and a Browse window is opened for the backup table.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE customer  && Opens Customer table

COPY STRUCTURE TO backup
USE backup
APPEND FROM customer FOR country = 'UK'
BROWSE FIELDS contact, country
USE
DELETE FILE backup.dbf