mysql 执行 sql 语句提示Parameter '@XXX' must be defined

Posted hbb0b0

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql 执行 sql 语句提示Parameter '@XXX' must be defined相关的知识,希望对你有一定的参考价值。

执行 sql 语句 MySqlException: Parameter \'@maxNo\' must be defined.

 

执行 sql 中含有自定义变量 @maxNo,抛出异常

 

 

 

 

 

解决方法:

 

连接字符串 加入 : Allow User Variables=True;

 

 

 

 

 

 

 

 

 

 

以上是关于mysql 执行 sql 语句提示Parameter '@XXX' must be defined的主要内容,如果未能解决你的问题,请参考以下文章