SW ENGINEERING/SqlAlchemy
[SQLAlchemy] subquery
How to make a subquery in sqlalchemy 서브쿼리 만들기 subquery = session.query(A.id).filter(A.something==2000).subquery() query = session.query(B).filter(B.something1.in_(subquery)) or subquery = session.query(A.id).filter(A.something==2000).subquery() query = session.query(B).\ filter(B.somethings.in_(subquery)).\ update({"key": value}, synchronize_session='fetch') --- synchronize_session=evaluate 파이썬에..
2022. 3. 8. 13:24
최근댓글