我有一个没有OUT或IN的过程,我无权更改该过程。
cursor = connection.cursor()
cursor.callproc('store_procedure',())
res = cursor.fetchall()
我已经尝试了一切,但是无法从MySQL Procedure中获得结果。
没有Python的过程正在运行并返回结果,大约需要20秒,但返回了一些东西。
该过程返回多行。
我可以不更改程序就得到结果吗?
将MySQLdb软件包用于python。
Procedures有点复杂,因为它们可以返回多个结果集
cursor.callproc('store_procedure')
for result in cursor.stored_results():
records = result.fetchall()
print(records)
即使只检索一张表。