Difference between revisions of "Unique constraint"

From wikieduonline
Jump to navigation Jump to search
Line 8: Line 8:
 
  [[ALTER TABLE]] tablename ADD [[CONSTRAINT]] constraintname UNIQUE (columns);
 
  [[ALTER TABLE]] tablename ADD [[CONSTRAINT]] constraintname UNIQUE (columns);
  
 +
== See also ==
 +
* {{PostgreSQL}}
 +
* {{SQL}}
  
* {{PostgreSQL}}
+
[[Category:SQL]]

Revision as of 10:14, 25 November 2022

ERROR:  duplicate key value violates unique constraint "YOUR_TEXT_HERE"
DETAIL: Key (id)=(XXXXXX) already exists


### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "live_measures_component"

Related

ALTER TABLE tablename ADD CONSTRAINT constraintname UNIQUE (columns);

See also

Advertising: