异常之You have an error in your SQL syntax

来源:互联网 发布:js中获取父节点 编辑:程序博客网 时间:2024/05/17 06:09

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 ” at line 1
这里写图片描述
我的这种错误,是sql语句有错误,

SELECT * FROM agenda WHERE 1=1 and aId={aId}

仔细看就能看出
正确的语句为:

  SELECT * FROM agenda WHERE 1=1 and aId=#{aId}
阅读全文
0 0
原创粉丝点击