Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

How to: Set a Data Column as the Primary Key 

Setting a data column as the primary key guarantees that each record contains a unique value. Only one primary key can be assigned to a data table. You create a primary key in a data table using the Dataset Designer.

To set a data column to be the primary key in a data table

  1. Open your dataset in the Dataset Designer.

  2. Right-click the column you want to set as the primary key. Click Set Primary Key.

    A key icon appears next to the selected column(s).

See Also

Community Additions

ADD
Show:
© 2015 Microsoft