Search code snippets, questions, articles...

Use of IN Clause Sqlalchemy

If you want to filter the records based on multiple values of a column then you can use in_ Clause of Sqlalchemy
session.query(
    MyModelname
).filter(
    MyModelname.id.in_((10,11,12,13))
).all()

Search Index Data (The code snippet can also be found with below search text)

filter records based on multiple values of a column
Was this helpful?
0 Comments
Programming Feeds
Learn something new everyday on Devsheet