Freigeben über


Modifying the Table Structure

After you have built a table you can always modify the table structure and properties. You may want to add, change or delete field names, widths, data types, change default values or rules, or add comments or captions.

You can open the Table Designer to modify your table's structure, or you can make changes programmatically using the ALTER TABLE command. Make sure you have exclusive access to the table before modifying its structure.

To modify the structure of a table with the Table Designer

  • In the Project Manager, select the table name and then choose Modify. The structure of the table is displayed in the Table Designer.

    -or-

  • In the Database Designer, select the table in the schema and choose Modify from the Database menu.

    -or-

  • Use the MODIFY STRUCTURE command.

For example, you can modify the structure of the database table employee with the following commands:

OPEN DATABASE testdata
USE employee EXCLUSIVE
MODIFY STRUCTURE

Each of the previous options opens the Table Designer.

To modify the structure of a table programmatically

The ALTER TABLE command offers extensive clauses that enable you to add or drop table fields, create or drop primary or unique keys or foreign key tags, and rename existing fields. Some clauses apply only to tables associated with a database. A few specific examples are included in this section.

See Also

Modifying Triggers | Adding Fields | Working with Tables | Deleting Fields | Renaming Fields | Setting or Changing Field-Level or Table Rules