CREATE FROM Command Example

The following example displays the structure of the orders table, copies the structure extended to the temp table, browses temp, creates a table called backup from temp, and displays the structure of backup.

CLOSE DATABASES
CLEAR
SET PATH TO (HOME(2) + 'Data\')     && Sets path to database
USE orders
DISPLAY STRUCTURE
WAIT WINDOW 'Structure of the orders table' NOWAIT
COPY STRUCTURE EXTENDED TO temp
USE temp
WAIT WINDOW 'Temp table has 1 row per field in ORDERS' NOWAIT
BROWSE
CREATE backup FROM temp
USE backup
DISPLAY STRUCTURE
WAIT WINDOW 'Backup.dbf has the same structure as ORDERS' NOWAIT
USE
DELETE FILE temp.dbf
DELETE FILE backup.dbf