Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

IntegrityError at duplicate key value violates unique constraint DETAIL: Key id already exists.

# Reset the counter of a table named yourTable to start at id # 1453
ALTER SEQUENCE yourTable_id_seq RESTART WITH 1453
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #IntegrityError #duplicate #key #violates #unique #constraint #Key #id
ADD COMMENT
Topic
Name
3+1 =