create procedure test_insert()mysql
-> beginsql
-> declare num int;ide
-> declare oid int;it
-> set num=160;class
-> while(num<350) dotest
-> insert into t_gatewayrouting(name) values(concat('vlstest',num));select
-> select max(id) from t_gatewayrouting into oid;di
-> insert into t_gatewayroutingsetting(gatewayrouting_id) values(oid);view
-> set num=num+1;vi
-> end while;
-> end&&
這裏mysql結束符我設置的是&&