Primary Keys
A primary key is a column in a table which:
- Has a unique value for each row (no duplicate values);
- Cannot contain an
empty
/null
value for any row.
A column can be marked as a primary key using the PRIMARY KEY
keyword, inside the CREATE
statement while creating the respective table.
Demonstration:
Everything was clear?
Thanks for your feedback!
SectionΒ 4. ChapterΒ 8
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Ask me questions about this topic
Summarize this chapter
Show real-world examples
Awesome!
Completion rate improved to 1.72
Primary Keys
Swipe to show menu
A primary key is a column in a table which:
- Has a unique value for each row (no duplicate values);
- Cannot contain an
empty
/null
value for any row.
A column can be marked as a primary key using the PRIMARY KEY
keyword, inside the CREATE
statement while creating the respective table.
Demonstration:
Everything was clear?
Thanks for your feedback!
SectionΒ 4. ChapterΒ 8