Difference between Primary key and Unique Key

Primary key
Unique Key
1-      Primary key doesn’t have a null value.

2-      A table can have only one primary key.

3-      By default primary key has a clustered index.
The unique key can hold null value but only once.

A table can have more than one unique key.

By default, the Unique key has a non- clustered index.

No comments:

Post a Comment

Please do not enter any spam link in the comment box.

NUnit : Introduction

There are several unit test tools in the market, but one of them is NUnit, the most popular tool for doing unit testing. So in this tutorial...