问题描述 向mysql中插入数据时报错,错误提示如下,代码如下 com.mysql.jdbc.exceptions.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 'like,note) values (?,?,?,?,?,?
问题描述 查询数据库报错,错误提示如下,代码如下 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 '? and sex=?' at line 1 解决方案 在执行 rs = pstat.executeQuery(sql); 之前 将sql打印出来,System.out.print