CodePudding user response:
Or have other way, urgentCodePudding user response:
Need to store process, parameterdelimiter $$
Create procedure (p)
The begin
Set @ f=0, @ r=10;
Prepare st from 'insert into t2 select * from t1 limit? And 10 ';
While @ r=10 do
The execute st using @ f;
The select found_rows (), row_count () into @ f, @ r;
End the while;
Deallocate prepare st.
End $$
Delimiter.
Call p;
Drop procedure if the exists p;
CodePudding user response:
Limit 10