Can I Create Temporary Table In Sqlalchemy Without Appending To Table._prefixes?
I'd like to create a temporary table in SQLAlchemy. I can build a CREATE TABLE statement with a TEMPORARY clause by calling table._prefixes.append('TEMPORARY') against a Table obje
Solution 1:
No, prefix_with()
is defined for SELECT and INSERT only. But convenient way to add prefix to CREATE TABLE statement is passing it into table definition:
t = Table(
't', metadata,
Column('id', Integer, primary_key=True),
# ...
prefixes=['TEMPORARY'],
)
Post a Comment for "Can I Create Temporary Table In Sqlalchemy Without Appending To Table._prefixes?"