Reset Sequence using PostgreSQL

1
SELECT setval('YOUR_SEQUENCE_NAME', (SELECT MAX(id) FROM YOUR_TABLE_NAME));
This entry was posted in Database, PostgreSQL. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


9 + five =