db.beginTransaction(); try { for (...) { db.execSQL("...", new Object[]{}); } db.setTransactionSuccessful(); } catch (Exception e) { } finally { db.endTransaction(); }