python
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()
Was this helpful?
Similar Posts
- Create Enums and use them in SQLAlchemy
- [Python] Use json.dumps() to pretty-print Python dicts
- Use of else condition with for loop in Python
- Use of try, except, else and finally in python
- Use separator in print() method of python
- Learn to Use Python's Built-In String Functions
- Sqlalchemy basic db migration commands Python