Saturday, February 05, 2011

2 Column (or multiple columns) Primary Key in Sqlite

To create a table with 2 (or multiple/more) column primary keys in sqlite:

CREATE TABLE table1 (column1 INTEGER, column2 INTEGER, column3 VARCHAR(255), PRIMARY KEY (column1, column2));


No comments:

Post a Comment