次の方法で共有


How to: Copy Tables

You can copy tables in two steps:

  1. Copy the table structure.

  2. Copy the data from the source table to the destination table.

To copy the structure of a table

  1. Open the source table with the USE command.

  2. Copy the source table structure and create the destination table by choosing one of the following:

    • To copy only the table structure not including information such as default values, triggers, and validation rules, use the COPY STRUCTURE command.

    -OR-

    • To copy the table structure including information such as default values, triggers, and validation rules, use the COPY STRUCTURE EXTENDED command.

For more information, see USE Command, COPY STRUCTURE Command, and COPY STRUCTURE EXTENDED Command.

To copy data between tables

  1. Open the source table and destination table with the USE command.

  2. Copy the data from the source table to the destination table with the APPEND FROM command.

For more information, see USE Command and APPEND FROM Command.

See Also

Tasks

How to: Edit Table Structure

Other Resources

Working with Tables (Visual FoxPro)

Managing Tables