I have an android app that needs to check if there’s already a database available in the device, and if not, process some things and eventually create it.Then check if a particular table exists.

If database exists and table exists simply read the data from the database if the data does exist.

Tip: For checking if a table Exists:

However, It is easy to find if a table exists or NOT,

Create a SQLiteDatabase object and have a call to query(…), the sql query string has select command. If the returned cursor is null then the table doesn’t exist.

Incoming search terms:

  • android sqlite check if table exists
  • sqlite check if table exists
  • html5 create sqlite database
  • create table if not exists sqlite android
  • windows phone check database exists or not
  • phonegap check table exists
  • phonegap db table exists
  • phonegap sqlite cursor cur = db rawquery()
  • selecting android sqlite from html5
  • phonegap check if table exists or not

Tagged with:

Filed under: Android

Like this post? Subscribe to my RSS feed and get loads more!