oracle语句传值问题请教
语句是这么写的:
update table set col1=?,col2=?,col3=? where id=?
参数是通过 oracleParameter[] para=new oracleParameter[]{
new oracleParameter("col1",col1的值),
new oracleParameter("col2",col2的值),
....
};
如果用:
update table set col1=:col1,col2=:col2,col3=col3 where id=:id
可以执行成功 用上面的?执行失败
使用?需要注意什么呢?
更新的比较多 参数基本一样 个人觉得使用?可以简化代码~