Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Primary Keys | Populating a Database
Introduction to SQL

bookPrimary Keys

A primary key is a column in a table which:

  1. Has a unique value for each row (no duplicate values);
  2. 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?

How can we improve it?

Thanks for your feedback!

SectionΒ 4. ChapterΒ 8

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Awesome!

Completion rate improved to 1.72

bookPrimary Keys

Swipe to show menu

A primary key is a column in a table which:

  1. Has a unique value for each row (no duplicate values);
  2. 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?

How can we improve it?

Thanks for your feedback!

SectionΒ 4. ChapterΒ 8
some-alt