1
我有某些具有特定代碼的sqlite數據。sqlite查詢相關問題
String sql = "create table " + TABEL
+"(" + BaseColumns._ID+" integer PRIMARY KEY AUTOINCREMENT," + STARTTIME
+ " text," + ENDTIME + " text," + DURATION + " text,"
+ PHONEOPTION + " text," + MODE + " text);";
db.execSQL(sql);
Log.i("DATABASE ", "db created ");
我想獲取持續時間列中沒有空數據的行。 我有一定的代碼,但它獲取其中的所有數據。
public Cursor getData() {
SQLiteDatabase sqlitedb = contactsdbHelper.getReadableDatabase();
Cursor cursor = sqlitedb.query(ContactsDatabaseHelper.TABEL, null,null,null, null,null, BaseColumns._ID + " DESC");
startManagingCursor(cursor);
return cursor;
}