Android sqlite: how to retrieve specific data from particular column?

后端 未结 9 2198
生来不讨喜
生来不讨喜 2020-12-31 18:17

I am developing restaurant menu application. My app has a sqlite table which has these columns:

\"id\", \"category\", \"item_name\"

Content

9条回答
  •  攒了一身酷
    2020-12-31 18:44

    String selectQuery = "select * from " + TABLE;
            sqlDatabase = this.getWritableDatabase();
    
         Cursor cursor = sqlDatabase.rawQuery(selectQuery, null);
    
        if (cursor != null) {
            cursor.moveToFirst();
        }
    
    
        return cursor;
    

    this will help you..

提交回复
热议问题