0
我怎麼能算圈數在光標mysql光標和循環次數。如何計算在MySQL遊標循環數
declare counter int;
set counter := 1;
open cursor1;
LOOP1: loop
set counter := counter + 1;
end loop LOOP1;
,但我得到的錯誤:
[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;
你發佈的內容(刪除光標行)包含在一個過程中,「編譯」好,可調用(無限循環)。請發佈您的真實代碼。 – Mat