解决sql语句中username=? 提示sql语句在?有错误的解决方法
在对该语句进行数据库连接查询时报了sql语句错误

解决sql语句中username=? 提示sql语句在?有错误的解决方法提示sql语句中?有错误

解决方法,将rs = stat.executeQuery(sql);中的sql删除
解决sql语句中username=? 提示sql语句在?有错误的解决方法

原因在于stat = conn.prepareStatement(sql);已经对sql语句进行了预编译
在rs = stat.executeQuery();加入sql相当于对原sql语句进行编译

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2021-06-26
  • 2021-12-31
  • 2021-09-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
相关资源
相似解决方案