db = openOrCreateDatabase("tompomodoros.db", Context.MODE_PRIVATE, null);
db.execSQL("CREATE TABLE mytable (_id INTEGER PRIMARY KEY AUTOINCREMENT, mydate VARCHAR, mydata SMALLINT)");
I use above code to create db and its table "mytable". But for the second time I run it, the phone goes to dead. I guess that is because I create the table again but it already exists there. So my question is how to create the table for the first time and open it for the rest times?
SQLiteOpenHelperwhich does all the version checking for you vogella.com/articles/AndroidSQLite/…