正常的oralce update语句:
update apmtest set apm_int=20 where apm_nchar='11' and apm_numeric='12';
不知道为什么jdbc update bind两个参数时,就是执行不成功?怀疑是单引号的问题
执行不成功:
PreparedStatement ps_update1 = con
.prepareStatement("update apmtest set apm_int=? where apm_nchar=? and apm_numeric=?");
ps_update1.setInt(1, 20);
ps_update1.setString(2, "11");
ps_update1.setString(3, "12");
ps_update1.execute();
执行成功:
PreparedStatement ps_update1 = con
.prepareStatement("update apmtest set apm_int=? where apm_nchar='11' and apm_numeric=?");
ps_update1.setInt(1, 20);
ps_update1.setString(2, "12");
ps_update1.execute();