代码:通过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())
2023-10-07 21:13:16
代码:通过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())