标签: python-3.x postgresql sqlalchemy
我发现了一个有关如何将一个表中的值插入另一个表的问题:
SQLAlchemy: Inserting the results of a query into another table
我的查询略有不同。
运行SQL时,您可以执行以下操作:
insert into table1(col1, col2) select some_constant_value_or_variable, col2 from table2;
在SQLAlchemy中是否可以做到这一点