Developer community
0 votes
24 views
asked by Guru (27.1k points) 31 48 96 | 24 views

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 by Guru (24.6k points) 29 51 77

Related questions

0 votes
2 answers
asked by john Guru (27.1k points) 31 48 96 | 63 views
0 votes
1 answer
asked by sunny Expert (11.4k points) 14 22 29 | 22 views
+2 votes
2 answers
0 votes
1 answer
asked by kelly johnes Advisor (6.3k points) 5 21 31 | 31 views
0 votes
1 answer
asked by john Guru (27.1k points) 31 48 96 | 28 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

Categories


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

3.8k questions

4k answers

117 comments

10.7k users

3,751 questions
4,046 answers
117 comments
10,709 users