postgresql create table add unique constraints
CREATE TABLE someTable ( id serial PRIMARY KEY, col1 int NOT NULL, col2 int NOT NULL, UNIQUE (col1, col2) )
Source: stackoverflow.com
create unique constraint postgres
//psql's inline help: $ \h ALTER TABLE ALTER TABLE tablename ADD CONSTRAINT constraintname UNIQUE (columns);
Source: stackoverflow.com