how can i transfer data use cursor

in MariaDB the cursor can't be a output datatype, generally in Oracle ,i declare a cursor and use it for transfer data,the sample like: out sys_refcursor... open rs for select * from %table name%; ... in c#,the cursor rs can be accepted,so i can get the whole data from %table name%. in MariaDB,how can i do this?

Answer Answered by roberto spadim in this comment.

hum, well from what i know, you have client side and server side cursors for c# you will use (maybe other) connector

i didn't tested it, but first you should tell what client library you are using, and what kind of cursor you will use

for server side if think you should do something like:

DECLARE rs CURSOR FOR SELECT * FROM a; OPEN rs; ... fetch .. ... CLOSE rs;

i don't have many information but i think it's a nice way to start...


Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.