Skip to content

Instantly share code, notes, and snippets.

@barsbek
Created March 19, 2018 09:37
Show Gist options
  • Save barsbek/d3f849493cd31d4ef469fa34b56da541 to your computer and use it in GitHub Desktop.
Save barsbek/d3f849493cd31d4ef469fa34b56da541 to your computer and use it in GitHub Desktop.
postgresql: add column with "id" from 1 with step 1
select * from some_table with ordinality as t(some_column, n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment