Guest User

Untitled

a guest
May 24th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. @Override
  2. public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
  3. if (oldVersion = 1 && newVersion > 1) {
  4. String alterSQL = "ALTER TABLE " + TABLE_NAME + " ADD COLUMN " + NEWCOLUMN + " INTEGER DEFAULT 100";
  5. db.execSQL(alterSQL);
  6. }
  7. }
Add Comment
Please, Sign In to add comment