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"};
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章