Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

setval max id postgresql sequence

SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));
Source by gist.github.com #
 
PREVIOUS NEXT
Tagged: #setval #max #id #postgresql #sequence
ADD COMMENT
Topic
Name
9+2 =