Delete a constraint (ADP)

Microsoft Office Access 2003

Delete a primary key constraint when you want to remove the requirement for uniqueness for the values entered in a column or a combination or columns.

ShowDelete a primary key constraint by creating a new primary key

  1. In the Database window, click Database Diagrams Button image under Objects, click the database diagram you want to open, and then click Design on the Database window toolbar.
  2. In your database diagram, select the primary key columns for the table whose primary key constraint you want to delete. A primary key column is identified by a primary key symbol Icon image in its row selector.
  3. Right-click the row selector for the column and select Primary Key.

ShowDelete a primary key constraint

  1. In the Database window, click Database Diagrams Button image under Objects, click the database diagram you want to open, and then click Design on the Database window toolbar.
  2. In your database diagram, select the table whose primary key constraint you want to delete.
  3. Right-click the table and select Indexes/Keys.
  4. Select the primary key index from the Selected index list.
  5. Choose Delete.

    Caution   Choosing Delete will result in an action that cannot be undone without losing all other changes made to the database diagram. To undo this action, close this database diagram and all other open database diagrams without saving the changes.

The constraint is deleted from the database when you save the database diagram.

ShowDelete a foreign key constraint

Delete a foreign key constraint when you want to remove the requirement to enforce referential integrity.

  1. In the Database window, click Database Diagrams Button image under Objects, click the database diagram you want to open, and then click Design on the Database window toolbar.
  2. In your database diagram, delete the relationship line that represents the foreign key constraint you want to delete.

    ShowHow?

    Delete a relationship when you no longer want to relate columns in two related tables. When you redesign tables, it is often necessary to delete relationships and then recreate them after your new design is complete. For example, if you decide to normalize a database and store all address data in one table, you would delete all the relationships to address columns between existing tables, create a new table containing the address columns, and then create relationships from the new address table to every table that requires an address.

    1. In the Database window, click Database Diagrams Button image under Objects, click the database diagram you want to open, and then click Design on the Database window toolbar.
    2. In your database diagram, select the line that represents the relationship that you want to delete from the diagram.
    3. Right-click the relationship line and choose Delete Relationship from Database from the shortcut menu.
    4. A message box prompts you to confirm the deletion. Choose Yes.

      Note   When you delete a relationship, the relationship line is removed from every diagram in which it appears. It is deleted from the database when you save the database diagram or when you save either of the tables that it related.

    Note   Deleting a relationship from a database diagram marks the related tables as modified in all database diagrams in which they appear.

ShowDelete a check constraint

Delete a check constraint when you want to remove the limitations on data values that are accepted in the column or columns included in the constraint expression.

  1. In the Database window, click Database Diagrams Button image under Objects, click the database diagram you want to open, and then click Design on the Database window toolbar.
  2. In your database diagram, right-click the table containing the constraint, then select Constraints from the shortcut menu.
  3. Select the constraint from the Selected constraint list.
  4. Choose Delete.

    Caution   Choosing Delete will result in an action that cannot be undone without losing all other changes made to the database diagram. To undo this action, close this database diagram and all other open database diagrams without saving the changes.

The constraint is deleted from the database when you save the database diagram.

ShowDelete a unique constraint

Delete a unique constraint when you want to remove the requirement for uniqueness for values entered in the column or combination of columns included in the constraint expression.

  1. In the Database window, click Database Diagrams Button image under Objects, click the database diagram you want to open, and then click Design on the Database window toolbar.
  2. In your database diagram, right-click the table containing the constrained column or columns, then select Indexes/Keys from the shortcut menu.
  3. Select the unique constraint from the Selected index list.
  4. Choose Delete.

    Caution   Choosing Delete will result in an action that cannot be undone without losing all other changes made to the database diagram. To undo this action, close this database diagram or table design window and all other open database diagrams and table design windows without saving the changes.

The constraint is deleted from the database when you save the database diagram.