Skip to content

Instantly share code, notes, and snippets.

@deeuu
Created July 17, 2018 07:34
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 deeuu/a50db0423c34cb95fec67b76234cb747 to your computer and use it in GitHub Desktop.
Save deeuu/a50db0423c34cb95fec67b76234cb747 to your computer and use it in GitHub Desktop.
SQLAlchemy: number of rows
# https://stackoverflow.com/questions/10822635/get-the-number-of-rows-in-table-using-sqlalchemy
num_rows = session.query(MyTable).count()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment