这段创建MySQL自定义函数的代码在declare c varchar(25)一句报错,查不出原因,望援手解决。DELIMITER //drop function if exists myweek;create function myweek(a varchar(25)) returns varchar(25)BEGIN declare b varchar(25); set b=DATE_ADD(a,interval -day(a)+1 day); declare c varchar(25);select casewhen a >=DATE_ADD(b,interval 21 day) then concat("第4周【",DATE_ADD(b,interval 21 day),"~",last_day(a),"】")when a >=DATE_ADD(b,interval 14 day) then concat("第3周【",DATE_ADD(b,interval 14 day),"~",DATE_ADD(b,interval 20 day),"】")when a >=DATE_ADD(b,interval 7 day) then concat("第2周【",DATE_ADD(b,interval 7 day),"~",DATE_ADD(b,interval 13 day),"】")else concat("第1周【",b,"~",DATE_ADD(b,interval 6 day),"】")end into c return c;END;//===================================报错截图: