Define primary key. What is the procedure of applying primary key MS Access?
The attribute or combination of attributes that uniquely identifies a row or record in a relation is known as primary key. Every record in a table must have a primary key. It differentiates it from all other records in the table. A social security number is an example of a record whose values will only appear once in a table.
A separate field can be added in the table if no existing field produces unique values for every record. MS Access asks the user to create this type of field if the user does not specify primary key while saving the table. MS Access uses the field name ID and data type AutoNumber for this field.
The Following procedure is used to specify a primary key:
- Right click the record to be used as primary key. A shortcut menu will appear.
- Select Primary Key from shortcut menu. OR select Edit > Primary Key. The primary key field contains a key image to the left.