exec SQL using SQLiteDatabase - Android Database

Android examples for Database:SQL Query

Description

exec SQL using SQLiteDatabase

Demo Code


//package com.book2s;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;

public class Main {
    public static void execSQL(SQLiteDatabase db, String sql) {
        try {/*from  w w  w  . j  a v  a  2s .c  om*/
            db.execSQL(sql);
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}

Related Tutorials