How to add two new Column to Android SQLite Database?
You can only add one column at a time. Split it into two ALTER TABLE
statements and you should be fine.
private static final String ALTER_USER_TABLE_ADD_USER_SOCIETY =
"ALTER TABLE user_table ADD user_society TEXT";
private static final String ALTER_USER_TABLE_ADD_USER_STREET1 =
"ALTER TABLE user_table ADD user_street1 TEXT";
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
{
db.execSQL(ALTER_USER_TABLE_ADD_USER_SOCIETY);
db.execSQL(ALTER_USER_TABLE_ADD_USER_STREET1);
}