Adding a unique constraint to a Postgres database column

Public, Databases

harrylevine

Created: Aug 11, 2015     Updated: Aug 11, 2015


According to the Postgres docs, the template for the above are:

ALTER TABLE products ADD CONSTRAINT some_name UNIQUE (product_no);

and

ALTER TABLE products DROP CONSTRAINT some_name;