Chrome Extension

Get first record Sqlalchemy

Get the very first record from a model or table using the Sqlalchemy query.
#Get vey first record from a table which has id grater than 10
session.query(User).filter(User.id > 10).first()
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool

You can get the very first record from a table using the Sqlalchemy query using the .first() method.

Was this helpful?
0 Comments