flask_sqlalchemy 调用存储过程

代码:通过cursor方式调用

from flask_sqlalchemy import SQLAlchemy

db = SQLAlchemy()

connection = db.engine.raw_connection()

cursor = connection.cursor()

cursor.callproc('sp_getUsers')

for result in cursor.stored_results():

        print(result.fetchall())

posted @ 2021-11-28 09:39  决明子~  阅读(547)  评论(0编辑  收藏  举报