PRIMARY KEY Constraint
Learn PRIMARY KEY Constraint (Constraints, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Introduction A PRIMARY KEY uniquely identifies every row. It implies UNIQUE plus NOT NULL , a table has at most one, and it may span several columns (composite). In InnoDB the primary key is also the clustered index : the table rows are physically stored in primary-key order.