Difference between a primary key and a unique key

Difference between a primary key and a unique key.

Primary keyUnique key
It cannot have a NULL value.It may have a NULL value.
Each table can have only one primary key.Each table can have more than one Unique constraint.
By default it is organized in the sequence of the clustered index.By default it is a unique non-clustered index.
It supports auto increment value.It does not support the auto increment value.
What is bit datatype?
Bit datatype is used to store boolean information like 1 or 0 (true or false)........
Define candidate key, alternate key, composite key
Candidate key: A column or a set of columns can be called as candidate key if they i dentify each row of a table uniquely........
Define composite key
A key formed by combining at least two or more columns.......
Post your comment