问题描述
我试图在mysql中做一个procdure,返回一个数组的结果,我曾经使用oracle ref游标,但在mysql不知道如何继续,我必须传递参数太...
任何人都知道我能做什么,还是有个例子来告诉我?非常感谢...
MySQL中没有REF CURSOR的模拟。存储过程和函数允许只传递和返回标量数据类型,请参见这里 - 。
MySQL无法操作数组。解决方法是使用(或TEMPORARY TABLE )。
此外 - 利用视觉对象编辑器和,位于。
I am trying to make a procdure in mysql that returns me an array with the result, I used to do with the oracle ref cursor, but in mysql do not know how to proceed,I have to pass parameters too...
Anyone know how I can do, or have an example to show me? Thank you very much...
There is no analog of REF CURSOR in MySQL. Stored procedures and functions allow to pass and return only scalar datata types, see the reference here - CREATE PROCEDURE and CREATE FUNCTION Syntax.
MySQL cannot operate with arrays. A workaround is to use a table (or TEMPORARY TABLE).
Also - take advantage of visual object editors and stored procedure debugger in dbForge Studio for MySQL.
这篇关于什么是相当于Oracle的REF CURSOR在MySQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!