在其他答案有效的同時,SQLAlchemy為標量查詢提供了捷徑 ResultProxy.scalar() : count = db.engine.execute('select count(id) from ...
確定! 回上一頁