> > both of the above stackoverflow recipes refer to usage of the > SQLAlchemy select() object. When you have an ORM Query object, you > can get the underlying select() from it by calling upon the .statement > accessor: >
Thanks for this information. I imagine that there is no need to use the attribute “statement” <https://docs.sqlalchemy.org/en/13/orm/query.html#sqlalchemy.orm.query.Query.statement> if I can stick to the high-level ORM programming interface. > ins = InsertFromSelect(temp, my_query.statement) > session.execute(ins) > The call of the method “Insert.from_select” <https://docs.sqlalchemy.org/en/13/core/dml.html#sqlalchemy.sql.expression.Insert.from_select> can occasionally be also interesting. But I am looking for direct support of the SQL command “CREATE TABLE AS SELECT” (CTAS) <https://en.wikipedia.org/wiki/Data_definition_language#CREATE_TABLE_statement> without switching to the “core” API. Will any software extensions be helpful for this purpose? Regards, Markus -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.