Compartir a través de


How to: Edit Table Structure

You can edit the structure of a table, which defines the fields and their attributes as well as indexes for the table.

To edit the structure of a free table

  1. On the File menu, click Open.

  2. In the Open dialog box, browse to and select the table (.dbf) file you want to open, and click OK.

  3. On the View menu, click Table Designer.

    The Table Designer opens so you can change attributes for fields, indexes, and the table.

For more information, see Table Designer (Visual FoxPro).

To edit the structure of a database table

  1. Open the database in the Database Designer.

  2. In the Database Designer, click the table you want to edit.

  3. On the Database menu, click Modify.

The Table Designer opens so you can change attributes for fields, indexes, and the table.

To edit the structure of a table in a project

  1. Open the project in the Project Manager.

  2. In the Project Manager, expand the Data node.

  3. Choose one of the following:

    • Expand the Databases node, the database node containing the table, then the Tables node, and click the table whose structure you want to edit.

    -OR-

    • Expand the Free Tables node, and click the table whose structure you want to edit.
  4. In the Project Manager, click Modify.

    The Table Designer opens so you can change attributes for fields, indexes, and the table.

For more information, see Table Designer (Visual FoxPro).

To edit the structure of a table programmatically

  1. Open the table with the USE command.

  2. Choose one of the following:

    • To edit the structure by opening the Table Designer, use the MODIFY STRUCTURE command.

      -OR-

    • To edit the structure without opening the Table Designer, use the SQL ALTER TABLE command.

For more information, see USE Command, MODIFY STRUCTURE Command, and ALTER TABLE - SQL Command.

See Also

Tasks

How to: View Records in Tables

Other Resources

Working with Tables (Visual FoxPro)

Creating Tables