I am trying to figure how to insert a null value into an SQLite table in Android.
This is the table:
\"create table my table (_id integer primary key
Yes, you can skip the field in ContentValues and db.insert will set it NULL. Also you can use the other way:
ContentValues cv = new ContentValues(); cv.putNull("column1"); db.insert("table1", null, cv);
this directrly sets "column1" NULL. Also you can use this way in update statement.