Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
primary key constraint column can not be null, unique constraint column may be empty
A table can have at most one primary key, but can have multiple unique, unique can be defined as a table of multiple fields.
即:primary key = unique + not null
InnoDB storage engine will secondary index (non-primary key index) comprising a primary key index