这样的FOR循环会在MySql中运行吗? ......它不会为我编译

时间:2017-04-06 14:43:29

标签: mysql for-loop

create procedure wfhnxtmth
   (in inYear  int,
    in inMonth int)

begin
   FOR week AS 
      SELECT week FROM calendar WHERE month = inMonth
   DO   
      INSERT INTO calname
         (id,year,month,week,monstat,tuestat,wedstat,thustat,fristat,pager)
         SELECT id, inYear, inMonth, week, 'IN', 'IN', 'IN', 'IN', 'IN', 'N'
         FROM name;
   END FOR;
end  

1 个答案:

答案 0 :(得分:0)

不,您不能将sps从一个DBMS系统转移到另一个DBMS系统并期望它们运行。你必须用目标DBMS的古怪语言重写它们。