preparredStatement MySQL server version for the right syntax to use near '?,?,?)
Stringsql="insertintotablename(a,b,c)values(?,?,?)";
PreparedStatementpstmt=conn.prepareStatement(sql);
//执行查询
pstmt.executeQuery(sql);
//执行更新
pstmt.executeUpdate(sql);原因:PreparedStatement在创建时已经缓