Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

postgres set sequence value to max id

SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));
 
PREVIOUS NEXT
Tagged: #postgres #set #sequence #max #id
ADD COMMENT
Topic
Name
3+6 =