【发布时间】:2014-11-26 08:22:38
【问题描述】:
我需要执行这个查询::
select field11, field12
from Table_1 t1
left outer join Table_2 t2 ON t2.tbl1_id = t1.tbl1_id
where t2.tbl2_id is null
我在 python 中有这些类:
class Table1(Base):
....
class Table2(Base):
table_id = Column(
Integer,
ForeignKey('Table1.id', ondelete='CASCADE'),
)
....
我如何从下面到达上面?
【问题讨论】:
标签: python sql sqlalchemy