Is there a difference between Primary key and UNIQ Clustered index?
For example, if you create on the UNIQ Clustered index column, then it is not perceived by the studio as a primary key.
Is there a difference between Primary key and UNIQ Clustered index?
For example, if you create on the UNIQ Clustered index column, then it is not perceived by the studio as a primary key.
There is a difference. First of all, the semantic one — PK is the key of the string, i.e. a value that directly refers to a specific string, while a unique index is a restriction of the uniqueness of a specific set of fields (not necessarily the key of a field).
Example: In the table physical. Name and date of birth may be the primary key of the individual (although it’s not the fact that this is correct, these data may, in theory, not be unique), but the passport number and insurance certificate number may have a unique index (since they must not repeat), but not be the primary key.
In addition, the implementation difference is as follows:
The information was partially taken from here, you can get acquainted with the original: http://sqlhints.com/2013/06/02/difference-between-primary-key-and-unique-key-in-sql-server/
Source: https://ru.stackoverflow.com/questions/603002/
All Articles