DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SQL
postgresql resolv duplicate value violates unique constraint
SELECT setval(pg_get_serial_sequence('users', 'id'), coalesce(max(id)+1, 1), false) FROM users;
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#postgresql
#resolv
#duplicate
#violates
#unique
#constraint
ADD COMMENT
Topic
COMMENT
Name
9+6 =
Submit