Java tutorial
//package com.java2s; //License from project: Apache License import android.database.sqlite.SQLiteDatabase; import java.util.List; public class Main { private static void executeStatements(SQLiteDatabase database, List<String> statements) { try { database.beginTransaction(); for (String statement : statements) { database.execSQL(statement); } database.setTransactionSuccessful(); } finally { database.endTransaction(); } } }