Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

postgres duplicate key value violates unique constraint already exists

SELECT setval('the_primary_key_sequence', (SELECT MAX(the_primary_key) FROM the_table)+1);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #postgres #duplicate #key #violates #unique #constraint #exists
ADD COMMENT
Topic
Name
9+3 =