I am having an SQLite table and wish to set it with a default value for time being. how can I do that?
Below is my DatabaseHelper class code:
import
I believe you can do this:
arg0.execSQL("CREATE TABLE finalP(_id INTEGER PRIMARY KEY AUTOINCREMENT,time TEXT DEFAULT \'50\');");
and it should work fine.
See the sqlite docs for column constraints. http://www.sqlite.org/syntaxdiagrams.html#column-constraint