标签:
1、错误描述
2、错误原因
BEGIN SELECT stuAge INTO amount; IF stuAge IS NOT NULL THEN SET stuAge = stuAge + 1; SELECT stuAge INTO amount1; ELSE SELECT 20 INTO amount2; END IF; SELECT stuAge INTO amount3; END;
amount实际是stuAge的别名,但是却写成了一个变量
3、解决办法
BEGIN SELECT stuAge AS amount; IF stuAge IS NOT NULL THEN SET stuAge = stuAge + 1; SELECT stuAge AS amount1; ELSE SELECT 20 INTO stuAge; END IF; SELECT stuAge AS amount3; END
1327-Undeclared variable:amount
标签:
原文地址:http://blog.csdn.net/you23hai45/article/details/50499052