SQLAlchemy将数据注入到查询结果中以插入到另一个表中

时间:2020-10-13 21:51:38

标签: 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中是否可以做到这一点

0 个答案:

没有答案