Primary keys - the basics
Single-column primary keys
11. There can only be one...
Multicolumn primary keys
Auto-increment columns and sequences
Revision

Instruction

Great! Another important thing you should know about primary keys is that there can only be one primary key in each table. Let's check that.

Exercise

Run the template code we created for you. As you can see, we tried to set both the id and title columns as the primary keys. Do you think we will succeed?

Console

Code editor

Result

TableConsole