Skip to content

Instantly share code, notes, and snippets.

@abairo
Created April 10, 2018 16:13
Show Gist options
  • Save abairo/f6fc1e42923c0873ef842022229789a8 to your computer and use it in GitHub Desktop.
Save abairo/f6fc1e42923c0873ef842022229789a8 to your computer and use it in GitHub Desktop.
SELECT table_name, column_name, column_default from information_schema.columns where table_name='testing';
SELECT nextval('your_table_id_seq');
SELECT setval('professional_dealer_id_seq', COALESCE((SELECT MAX(id)+1 FROM professional_dealer), 1), false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment