Sqlite primary key on multiple columns

composite-primary-keyddlprimary-keysqlite

What is the syntax for specifying a primary key on more than 1 column in SQLITE ?

Best Solution

According to the documentation, it's

CREATE TABLE something (
  column1, 
  column2, 
  column3, 
  PRIMARY KEY (column1, column2)
);