I am trying to get a cursor which contains one row and the entry in a particular column of that row should be least when compared to corresponding entries in other rows.
The query that i am using is:
mDb.query(true, DATABASE_TABLE_2, new String[] { "min (" +KEY_TIMEOUT+ ")", KEY_ROWID, KEY_NAME, KEY_UNIV }, null, null, null, null);
this is not returning anything. Is there a better solution.
then set a limit on the amount of rows:
LIMIT 1You can sort by that column so the smallest value in that column is first:
ORDER BY columnThat should result in