create from 命令示例

下面的示例显示了 orders 表的结构,用扩展方式把结构复制到 temp 表,浏览 temp,从 temp 创建表 backup,并显示 backup 的结构。

close databases
clear
set path to (home( ) + 'samples\data\') && 设置到数据库的路径
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