/** * 功能:判断该表是否已存在于数据库中 * @param "表名" */ public boolean IsExist(String table){ boolean exist = false; String sql = "select * from sqlite_master where name="+"'"+table+"'"; Cursor cursor = db.rawQuery(sql,null); if(cursor.getCount()!=0){ exist = true; } return exist; }