I am trying to insert 2 rows into a table, when the DataBase is created for the first time .
Here is my code:
private static class DatabaseHelper extends SQLiteOpenHelper {
DatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase _db) {
_db.execSQL(DATABASE_CREATE_SQL);
_db.execSQL(DATABASE_CREATE_SQL_TABLE2);
_db.execSQL("INSERT INTO "+DATABASE_TABLE_2+" VALUES('com.android.music',1);");
_db.execSQL("INSERT INTO "+DATABASE_TABLE_2+" VALUES('com.android.clender',1);");
}
Please let me know if i am wrong . Is there any other way of doing it.