批处理相关方法
void addBatch(String sql) 添加批处理
void clearBatch() 清空批处理
int[] executeBatch() 执行批处理
public void save(Listlist) { // SQL String sql = "INSERT INTO admin(userName,pwd) values(?,?)"; try { // 获取连接 con = JdbcUtil.getConnection(); // 创建stmt pstmt = con.prepareStatement(sql); // 【预编译SQL语句】 for (int i=0; i