Share via


How to: Delete Primary Keys

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.

Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.

To delete a primary key constraint

  1. In Server Explorer, select the table with the primary key, and from the Data menu click Open Table Definition.

    The table opens in Table Designer.

  2. In the table grid, right-click the row with the primary key and choose Remove Primary Key to toggle the setting from on to off.

Note

To undo this action, close the table without saving the changes. Deleting a primary key cannot be undone without losing all other changes made to the table.

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

See Also

Reference

Indexes/Keys Dialog Box

Other Resources

Working with Keys