Answers for "reset sequence postgres max id"

SQL
2

postgresql reset sequence

ALTER SEQUENCE <tablename>_<id>_seq RESTART WITH 1
Posted by: Guest on March-30-2021
0

reset postgres table index to next max value

SELECT SETVAL('some_table_id_seq',MAX(id)+1) FROM some_table
Posted by: Guest on September-09-2021

Code answers related to "reset sequence postgres max id"

Code answers related to "SQL"

Browse Popular Code Answers by Language