alter table make unique a value from a table postgresql code example Example: postgresql update to unique ALTER TABLE foo ADD UNIQUE (thecolumn);