The PRIMARY KEY INDEX is the most common type of index found in relational databases. In MySQL PRIMARY KEY is a field in a table that uniquely identifies each record in that table. In other words, all values in the indexed column(s) must occur once. A PRIMARY KEY must be unique and cannot contain NULL values. MySQL allows to create only one PRIMARY KEY in a table. It must be named "PRIMARY". AUTO_INCREMENT columns mostly use this type. The primary keys are almost always added when creating the table. However, these can also be created using some other sql statements.
Primary Key Indexes Related FAQs
|