Question · SQL and MySQL course · Module 11: Capstone project

The role of a primary key

What is the purpose of a primary key (PRIMARY KEY) in a table?

Answer options

  • It stores the database administrator's password
  • It sets the background color of the results
  • It translates data into another language
  • It uniquely identifies each row - no two rows share the same value

You can check the correct answer by solving this task in the CodeWorlds game.