I am using Sqlite as a database in my project. I am trying to using Alter with modify command but i fail every time.
switch (oldVersion) {
case 1:
db.execSQL("ALTER TABLE " + TABLE_NAME + " MODIFY "
+ MessageCountConstant.DATE + " INTEGER");
default:
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
onCreate(db);
}
error logs which i got :
01-10 14:51:56.242: E/Database(1279): Failure 1 (near "MODIFY": syntax error) on 0x3702c0 when preparing 'ALTER TABLE messageCount MODIFY date INTEGER'.
can anyone tell me about the reason of this and also proper answer . Thanks in advance.