create procedure test_insert()
-> begin
-> declare num int;
-> declare oid int;
-> set num=160;
-> while(num<350) do
-> insert into t_gatewayrouting(name) values(concat(‘vlstest‘,num));
-> select max(id) from t_gatewayrouting into oid;
-> insert into t_gatewayroutingsetting(gatewayrouting_id) values(oid);
-> set num=num+1;
-> end while;
-> end&&
这里mysql结束符我设置的是&&