`
pavel
  • 浏览: 924010 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

出现的错误

    博客分类:
  • jdbc
阅读更多

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 '?'

出现这种错误的原因是在执行sql的时候使用了pstmt.executeQuery(sql)这个实际上是statement的方法,不支持?号占位符,所以正确的使用是pstmt.executeQuery()

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics