Rainbow Deals - hours only!Up to 80% off on all courses and bundles.-Close
Primary keys - the basics
3. Primary keys - Missing values
Single-column primary keys
Multicolumn primary keys
Auto-increment columns and sequences


Great! As you could see, each id was indeed unique and they were generally speaking consecutive numbers. One number was missing (7), but nothing particular happens. You will, however, discover soon enough that no two rows can share the same value in the primary key column.


Okay, let's add a movie with id 7 so that there is no gap in numbering. Its title is Titanic and it was produced in 1997.

Stuck? Here's a hint!


INSERT INTO movie VALUES (7, 'Titanic', 1997);