What is the syntax for specifying a primary key on more than 1 column in SQLite ?
According to the documentation on CREATE TABLE
, specifically table-constraint
, it's:
CREATE TABLE something (
column1,
column2,
column3,
PRIMARY KEY (column1, column2)
);