How to get column names from SQLAlchemy result (declarative syntax)

You can do something similar to Foo Stack’s answer without resorting to private fields by doing:

conn.execute(query).keys()

Leave a Comment