Learning outcomes
-------------------------------
1) How to upgrade the database
2) how to drop a table
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
try {
Toast.makeText(context,"onUpgrade is called",Toast.LENGTH_SHORT).show();
db.execSQL(DROP_TABLE);
onCreate(db);
}catch (Exception e)
{
Toast.makeText(context,"Exception : "+e,Toast.LENGTH_SHORT).show();
}
}
sql Database : https://www.youtube.com/playlist?list=PLgH5QX0i9K3qLcx9DvVDWmNJ7riPvxzCD
Subscribe : https://www.youtube.com/channel/UCEXwc6mNh7Lakj6lX-7a2Mg
Facebook : https://www.facebook.com/anisul2010s
Facebook page : https://www.facebook.com/studywithanis/
Continue this lesson in the app
Install CourseHive on Android or iOS to keep learning while you move.