I have created a single row table where the only function will be to update some values. I just have to make an INSERT with default values that run the first time
I do the following but without success. Where can I make this insert so that it only runs the first time I install and open the app?
public class BD extends SQLiteOpenHelper {
String sqlCreate = "CREATE TABLE jugador (codigo INTEGER PRIMARY KEY AUTOINCREMENT, " +
"nombre TEXT DEFAULT 'Jugador')";
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(sqlCreate);
db.execSQL("INSERT INTO jugador (nombre) VALUES ('jugador') ");
}
}