How can i count number of loops in cursor
declare counter int;
set counter := 1;
open cursor1;
LOOP1: loop
set counter := counter + 1;
end loop LOOP1;
but i get error of:
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set counter := counter + 1;
end loop LOOP1;
Maybe you have to remove the
:in thesetto solve the sql syntax error:and