BOX_ID 列是整数其余是 varchar
sql="UPDATE TOYS SET ?=?,?=?,?=? WHERE NAME=? AND LICENSE=? AND BOX_ID=? ";
p_statement2=connection.prepareStatement(sql);
p_statement2.setString(1, "NAME");
p_statement2.setString(2, "toy1");
p_statement2.setString(3, "VENDOR");
p_statement2.setString(4, "vendor1");
p_statement2.setString(5, "SIZE");
p_statement2.setString(6, "size1");
p_statement2.setString(7, "toyx");
p_statement2.setString(8, "license1");
p_statement2.setInt(9, 11);
try
{
p_statement2.executeUpdate();
}
catch(Exception kl)
{
kl.toString();
kl.printStackTrace();
p_statement2.close();
}
得到以下异常 -
java.sql.SQLException: ORA-01747: 无效的 user.table.column、table.column 或列规范