本文主要是介绍1327-Undeclared variable:amount,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1、错误描述
2、错误原因
BEGINSELECT stuAge INTO amount;IF stuAge IS NOT NULL THENSET stuAge = stuAge + 1;SELECT stuAge INTO amount1;ELSESELECT 20 INTO amount2;END IF;SELECT stuAge INTO amount3;
END;
amount实际是stuAge的别名,但是却写成了一个变量
3、解决办法
BEGINSELECT stuAge AS amount;IF stuAge IS NOT NULL THENSET stuAge = stuAge + 1;SELECT stuAge AS amount1;ELSESELECT 20 INTO stuAge;END IF;SELECT stuAge AS amount3;
END
这篇关于1327-Undeclared variable:amount的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!