I have recently started developing some app in Android studio. I am trying to understand SQLite database. I am trying to create a simple table and inserting into it. My application crashes after running the following code.
SQLiteDatabase db = openOrCreateDatabase("StudentDB",android.content.Context.MODE_PRIVATE, null);
db.execSQL("CREATE TABLE IF NOT EXISTS student "+ " (name VARCHAR, number VARCHAR );");
String name = ((EditText) findViewById(R.id.NameField)).getText().toString();
String num = ((EditText) findViewById(R.id.NumberField)).getText().toString();
db.execSQL("INSERT INTO student VALUES('"+name+"','"+num+"');");