Difference between Primary key Constraint and Unique key Constraint in SQL Server

hi,
Difference between Primary key Constraint and Unique key Constraint in SQL Server. Unique Key Constraint:The column values should retain uniqueness.It allows null values in the column.It will create non-clustered index by default.Any number of unique constraints can be added to a table.
Primary Key Constraint:Primary key will create column data uniqueness in the table. It Wont allow Null values.By default Primary key will create clustered index.Only one Primary key can be created for a table.Multiple columns can be consolidated to form a single primary key


Regards
Switin

Comments

Popular posts from this blog

Shared / Static Class in vb.net/C#

Xamarin Forms : PopUp Page with RG.Plugins.Popup

Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard)