Skip to content

Instantly share code, notes, and snippets.

@asilbalaban
Created August 23, 2022 13:27
Show Gist options
  • Save asilbalaban/661155323e339b2fd669ce7758080795 to your computer and use it in GitHub Desktop.
Save asilbalaban/661155323e339b2fd669ce7758080795 to your computer and use it in GitHub Desktop.
postgre-reset-auto-increment.sql
SELECT SETVAL(pg_get_serial_sequence('price_ranges', 'id'), (SELECT MAX(id) FROM price_ranges));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment