search
Login

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

0 votes
24 views
asked Guru 27.1k points 31 50 97

1 Answer

0 votes
Both primary key and unique key enforces uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn't allow NULLs, but unique key allows one NULL only.
answered Guru 24.6k points 29 52 81

Related questions

0 votes
2 answers 62 views
0 votes
1 answer 24 views
24 views
asked sunny Expert 11.4k points 14 22 28
2 votes
2 answers 5.3K views
0 votes
1 answer 33 views
0 votes
1 answer 31 views
31 views
asked john Guru 27.1k points 31 50 97
...