Error in the studying content?

Hi everyone,

I just signed up for codecademy and started browsing the contents. I decided to have a look at SQL, and as I was going through the details, I believe I might have found an error? (on this page: Key Concepts ).

It says that " There can be only one PRIMARY KEY column per table and multiple UNIQUE columns.". As far as I know you can have composite keys which can use 2 or more columns to form a primary key.

For example:

  QuestionID NUMERIC,
  PRIMARY KEY (QuestionID, MemberID)

Correct me if I’m wrong.

1 Like

As far as I am aware, you’re correct about the composite key.

I wonder if they simply meant to make the point that you have a single “PRIMARY KEY”, however defined, but can have multiple “UNIQUE” columns.

I’ll flag it. Thanks for mentioning it. :slight_smile:

1 Like