CREATE TABLE someTable ( id serial primary key, col1 int NOT NULL, col2 int NOT NULL, unique (col1, col2) )
autoincrement not postgresql. Do you want serial .
If col1 and col2 are unique and cannot be null, then they make a good primary key:
CREATE TABLE someTable ( col1 int NOT NULL, col2 int NOT NULL, primary key (col1, col2) )
Clodoaldo Neto Jan 08 '13 at 18:38 2013-01-08 18:38
source share