——————————————————————————————————————————————-
public boolean tabbleIsExist(String tableName){
boolean result = false;
if(tableName == null){
return false;
}
SQLiteDatabase db = null;
Cursor cursor = null;
try {
db = this.getReadableDatabase();
//Sqlite_master
String sql = “select count(*) as c from “+AppConstant.DataBaseName+” where type =’table’ and name ='”+tableName.trim()+”‘ “;
cursor = db.rawQuery(sql, null);
if(cursor.moveToNext()){
int count = cursor.getInt(0);
if(count>0){
result = true;
}
}

} catch (Exception e) {
// TODO: handle exception
}
return result;
}

——————————————————————————————————————————————-
select * from sqlite_master where name=’tablename’ and sql like ‘%fieldname%’;
type =’table’を追加するほうがいいかなぁ

——————————————————————————————————————————————-
下記の記事を参考すれば。。
DB初心者がIonicでSQLiteを動かすまで
https://medium.com/@yosshitaku067/db%E5%88%9D%E5%BF%83%E8%80%85%E3%81%8Cionic%E3%81%A7sqlite%E3%82%92%E5%8B%95%E3%81%8B%E3%81%99%E3%81%BE%E3%81%A7-128311065937