Add the settings for the database multi-field composite primary key.
First, a table cannot have more than one primary key. But there are multiple fields that can be combined into one primary key, which is why sometimes the table has multiple fields with a primary key, because they are combined into a primary key.
We can set it through the Enterprise Manager or through the T-SQL statement.
ALTER TABLE tablename ADD constraint Pk_name primary key (Colname1,colname2)
Enterprise Manager sets the primary key by pressing CTRL to select the field.
Multi-field primary key is when the selected field in the input information, all fields enter the same information will play the role of the primary key constraints.
For example: In the student information system, the class number and the school number with a field are set as the primary key, while the table entered the class number 1, card number 123. If you enter the class number 1, the card number 123, the primary key will play a role in the constraints. And if the input card number 1, the class number 234, or the card number 2, the class number 123. The constraint of the primary key will not be triggered.
SQL Server sets multiple fields as the primary key method