+ 3
what is difference between unique and primary key?
6 Respuestas
+ 1
Unique key prevents duplicate values in a column, while primary key identifies the row.
+ 1
A unique key is a unique constraint on a column, which allows one null value. It will also create a non clustered index. You can have multiple unique keys on different columns on the sane table.
A primary key is the combination of unique constraint and a not null constraint, plus a clustered index. You can only have one primary key on a table. Typically it is the first column on a table, one that uniquely identifies the rest of the data in the row, like ID.
0
Related with this question.... when you said, unique key prevents duplicate values in a column, what do you really means ? I will appreciate your answer. I just barely know about this programs, however, I am determine to learn.... Thank you...
0
thank you guys
0
Both guarantees the uniqueness in a column
0
unique key is used for a field to not allow any duplication in that column...
Primary key= unique key + not null