Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




c# and SQL interview question Video :- What is the difference between unique key and primary key?

  • Unique key can have nulls .Primary key cannot have nulls.
  • In a single table we can create multiple unique keys.In a single table we can have only one primary key.
  • Unqiue key creates a non-clustered index by default.Primary Key created a clustered index by default.
  • Both unique keys and primary keys can be referenced by foreign key.

 

Share this article   |    Print    |    Article read by 4315 times
Author:
Shivprasad koirala Koirala
I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small E-learning company in India. We are very much active in making training videos , writing books and corporate trainings. Do visit my site http://www.questpond.com for .NET, C# , design pattern , WCF , Silverlight , LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server training and Interview questions and answers
Related Articles: No related article
Related Interview Questions: No related interview question