Home > database >  Mysql how each check 10 data until the end
Mysql how each check 10 data until the end

Time:09-27

No paging, I was ready to use JSTL to query the data of article 10 of a set of traverse to a table on the table, a table (the same table),

CodePudding user response:

Or have other way, urgent

CodePudding user response:

Need to store process, parameter
 delimiter $$
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
  • Related