Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: FUNCTION queryCountByGradeWithProcesure does not exist
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

  • 当程序报此错误时,说明我们的存储过程是有问题的,这里有一点是需要大家牢记!!!!那就是在创建完存储过程之后,要使用:
CALL 存储过程名(参数);
  • 然后运行,运行之后,才会保存这个存储过程,切记,切记,切记,这是个坑!
    还有就是第一次运行存储过程时:
    在这里插入图片描述
    希望我的方案可以帮助到各位正在坑内的小伙伴!
Logo

更多推荐