Skip to content

Instantly share code, notes, and snippets.

@anderson-mota
Last active November 15, 2017 20:53
Show Gist options
  • Save anderson-mota/6402b3a70335d0825fd9d94984037623 to your computer and use it in GitHub Desktop.
Save anderson-mota/6402b3a70335d0825fd9d94984037623 to your computer and use it in GitHub Desktop.
PostgresSQL
SELECT nextval('releases_id_seq'::regclass);
SELECT setval(pg_get_serial_sequence('users', 'id'), coalesce(max(id),1), false) FROM users;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment