Primary key and Unique key enforces uniqueness of the column on which they are defined.The difference between primary key and unique are below.
- Primary Key can't accept null values but where as unique key can accept null value.
- By default, Primary key is clustered index but By default, Unique key is a unique non-clustered index.
- We can have only one Primary key in a table where as we can have more than one unique key in table.
0 comments:
Post a Comment