Possible duplicate:
SQLite in Android How to update a specific row
Is it possible to update the database for a single column using And that was my table structure, and I need to update the "messagestatus" column using "id".
db.execSQL("CREATE TABLE IF NOT EXISTS autosms(id INTEGER PRIMARY KEY AUTOINCREMENT ,phonenumber VARCHAR(15) ,message VARCHAR(5000) , year VARCHAR(10) , month VARCHAR(10) , date VARCHAR(10) , hour VARCHAR(10) , minute VARCHAR(10) , messagestatus VARCHAR(10))");
I tried with this, but without success theres a warning “There is no such column Send”
public void update(int id) { String s = "Send"; db= SQLiteDatabase.openDatabase("data/data/com.example.schduled_messages/SMS_Schdule_Sample.db", null, SQLiteDatabase.CREATE_IF_NECESSARY); db.execSQL("UPDATE autosms SET messagestatus="+s+" WHERE id="+id+""); }
Thanks at Advance ..
source share