Editing Difference Between Primary Key And Unique
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
<tab sep=bar head=top class=diff> | <tab sep=bar head=top class=diff> | ||
'''Primary Key''' | '''Unique''' | '''Primary Key''' | '''Unique''' | ||
− | A primary key is a constraint that ensures that a field or column of a sql table does not hold duplicate or null values | Unique is a constraint | + | A primary key is a constraint that ensures that a field or column of a sql table does not hold duplicate or null values | Unique is a constraint that a field does not have duplicates but allows null values. |
There can be only one primary key in a sql table | A Unique constraint can be applied on more than one field. | There can be only one primary key in a sql table | A Unique constraint can be applied on more than one field. | ||