Explore Library
Code QuizAdvanced

Two Primary Keys Mistake

Spot the schema error caused by declaring more than one primary key in a table.

Codesql
CREATE TABLE orders (
  order_id   INT PRIMARY KEY,
  customer_id INT PRIMARY KEY,
  order_date DATE NOT NULL,
  total      DECIMAL(10,2)
);

What is the bug in this table definition?