We can check the table exists or not by execute simple query private boolean isTableExists(SQLiteDatabase db, String table){ Just pass your table name in the above and you will find table exists or not
String sql = "SELECT name FROM sqlite_master WHERE type='table' AND name='"+tableName+"'";
Cursor mCursor = db.rawQuery(sql, null);
if (mCursor.getCount() > 0) {
return true;
}
mCursor.close();
return false;
}
How to Use Deprecated Handler() in Android - RRutors Guide
Set Activity to Fullscreen Mode in Android - RRutors
ERR_ACCESS_DENIED in Android Webview with sdk 30
Invoke-customs are only supported starting with android 0 --min-api 26
How to Exit android app on back pressed?
What is Intent? What is the difference between an implicit intent and an explicit intent?
How to get an image resource by it's name in android?
How do I check in SQLite whether a table exists?
How to convert milli seconds to hours, minutes and seconds in Android?
How to get screen size (width,height) in Android?
How can i comment inside xml file in android studio?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
What is ANR? How to avoid and resolve it?
What is the difference between match_parent and fill_parent?
Fix Play Store Rejection Due to SMS Permission - RRutors
How to convert DP to Pixel and Pixel to Dp?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
Extract Date and Time from Long Type Variable - RRutors
What is Android?
How to install/ uninstall apk by command line ADB
Hide/Disable soft keyboard on Activity launch: Android
How to Get bitmap from drawable: Android
What is NetworkOnMainThread Exception?
What is Application?
Open PDF in Google Drive with Intent in Android - RRutors
What is the Different Between val and var in Kotlin?
How do I generate random numbers in Dart?
How to save activity State in Android?
FCM Not Receiving Notifications in Android - RRutors
Android Studio project R can't find
How to check Android version?
How to copy database from assets folder in android using kotlin
Add Jar/Library Files as Dependency in Android Studio
Explain Fragment Life Cycle
Decompile APK Files: How to Get Source Code - RRutors Guide
Key Points to remember while develop the Android Application.
How to validate email address in Android with Kotlin?
How to get complete address from latitude and longitude?