Skip to content

Instantly share code, notes, and snippets.

@wisentini
Last active December 19, 2022 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wisentini/ee2260dced1a3d4d03079be4b0e61028 to your computer and use it in GitHub Desktop.
Save wisentini/ee2260dced1a3d4d03079be4b0e61028 to your computer and use it in GitHub Desktop.
Reset sequence in Postgres.
SELECT SETVAL('table_pkcolumn_seq', (SELECT MAX(pkcolumn) FROM public.table));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment