Spring 实施多条更新语句

Spring 执行多条更新语句SpringJDBC的更新多条的操作,返回的是一个int类型的数组; jdbcTemplate.batchUpda

Spring 执行多条更新语句

SpringJDBC的更新多条的操作,返回的是一个int类型的数组;

 jdbcTemplate.batchUpdate(new String[] { "update customer set first_name = 'FN#'",        "delete from customer where id > 2" });


定义数组的方法

String sql[] =new String[]{"sql1","sql2"};