SQLAlchemy多列查询去重

1、参考:https://blog.csdn.net/nongcunqq/article/details/120220247

https://docs.sqlalchemy.org/en/14/orm/query.html

2、代码示例:

db.session.query(Test).with_entities(Test.Name,Test.Age).distinct().all()

你可能感兴趣的:(python)