create or replace procedure allocate(IN N int)  declare 
     bal int;
     num int default 0;
     lo  int;
     mlo int;
     con int default  100000;
     ano int default  10000;  begin
   while num<=N loop
     set num=num+1;  
     set ano=ano+num;
     set mlo=floor(rand()*con) as int;
     set lo=floor(rand()*mlo) as int;
     set bal=floor(rand()*con) as int;
     insert into Account
     values(ano,bal,lo,mlo);
     commit;
   end loop;
   
  end;在kingbase数据库中可以正确执行,在MySQL中则报错:
   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 'procedure allocate(IN N int)
    begin
  declare
     bal int;
     num int defau' at line 1