Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Use these options to edit, define, or delete primary keys from a list of available columns and to specify whether to create an index on primary keys.

When you first display this category, you can view any primary key data about the table. You can then use this category to create or change the constitution of the primary key or its physical name, as well as to add an index to the primary key.

Available columns

Lists all columns in the current table that you can use to compose the primary key.

Generate as

Click the appropriate option to specify whether the column should be used as a primary key, alternate key, or non-unique index.

Note: Microsoft Office Visio requires that a key be specified to pass logical validation. Click No Key to allow a model to pass logical validation as if the column were a key, without having to generate an actual key in the database.

Create index

Select this check box to enable an index on the primary key.

Most database systems require an index on each primary key. An index is often associated with the physical name of the primary key.

Add >

Click to move the selected column from the Available columns list to the Primary ID columns list.

< Remove

Click to move the selected component of the primary key from the Primary ID columns list to the Available columns list.

Remove all

Click to move all components of the primary key from the Primary ID columns list to the Available columns list.

Primary ID columns

Lists columns that are components of the primary key.

Physical name

Type the name of the primary key as required by the target database.

The physical name should be a generic name; for example, PrimaryKey or PrimaryKey3. It is specific to the target database and must comply with its requirements.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!