conn.setAutoCommit(false);
while{
if(){
sql="update tb_disp_d9408 set prb0 = "+prbl+" where line = "+line ;
stmt.addBatch(sql);
}
}
int [] updateCounts = stmt.executeBatch();
conn.commit();
conn.setAutoCommit(true);//可选
while{
if(){
sql="update tb_disp_d9408 set prb0 = "+prbl+" where line = "+line ;
stmt.addBatch(sql);
}
}
int [] updateCounts = stmt.executeBatch();
conn.commit();
conn.setAutoCommit(true);//可选
你为什么不用
update trdt set prb1=prb1/1000 where ....and sbno='0801'