62,615
社区成员
发帖
与我相关
我的任务
分享
Statement stmt = null;
String[] sqls = {
"update monitor_id set lastid = 11 ,now_max_id = 11177 where id = 1",
"update monitor_id set lastid = 200 ,now_max_id = 200 where id = 2"
};
for (int i = 0; i < sqls.length; i++) {
try {
stmt.addBatch(sqls[i]);
} catch (SQLException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}
}
try {
stmt.executeBatch();
} catch (SQLException e) {
// TODO 自動生成された catch ブロック
e.printStackTrace();
}