I want to do an insert into a table from a select from another couple of tables. Something similar to:
INSERT INTO
`table_b`
SELECT table_a.id, props.description
FROM
table_a
JOIN
props
ON props.el_id = table_a.id;
How can I do this using SQL Expression Language? I'm talking about SQLAlchemy here.
I know there's a
db.execute(insert(table_b).values(id=20, description="another row"))
But I cant find a way to use a select
expression to get the data to be inserted.