Difference between revisions of "Unique constraint"

From wikieduonline
Jump to navigation Jump to search
Line 9: Line 9:
 
  [[ALTER TABLE]] tablename ADD [[CONSTRAINT]] constraintname UNIQUE (columns);
 
  [[ALTER TABLE]] tablename ADD [[CONSTRAINT]] constraintname UNIQUE (columns);
 
  [[duplicated keys]]
 
  [[duplicated keys]]
 +
 +
 +
== Activities ==
 +
* Read https://aws.amazon.com/blogs/database/hidden-dangers-of-duplicate-key-violations-in-postgresql-and-how-to-avoid-them/
  
 
== See also ==
 
== See also ==

Revision as of 10:17, 25 November 2022

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


Sonarqube

### 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);
duplicated keys


Activities

See also

Advertising: