mysql 5.5 局部变量赋值报错 1064 实在找不到语法哪错了,大家帮忙看看
declaremonth_datevarchar(7);IF(DATE_FORMAT(DATE_ADD(v_deal_date,INTERVAL1DAY),'%d')='...
declare month_date varchar(7);
IF (DATE_FORMAT(DATE_ADD(v_deal_date,INTERVAL 1 DAY),'%d')='01') then
(就报这行错误) set month_date=substr(v_deal_date,1,7);
…………sql
END IF;
[Err] 1064 - 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 '' at line 22 展开
IF (DATE_FORMAT(DATE_ADD(v_deal_date,INTERVAL 1 DAY),'%d')='01') then
(就报这行错误) set month_date=substr(v_deal_date,1,7);
…………sql
END IF;
[Err] 1064 - 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 '' at line 22 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询