I am using the SQLiteDatabase query SQLiteDatabase . I need help with the orderBy parameter of this method.
Cursor cursor = sqLiteDatabase.query(tableName, tableColumns, whereClause, whereArgs, groupBy, having, orderBy);
public Cursor getAllCustomexp(int TID) throws SQLException { Cursor mCursor = db.query(false, CEXP_TABLE, new String[] {KEY_CEID, FLD_CETID, FLD_CEEID, FLD_CEMID, FLD_CEAMT, FLD_CESEL}, FLD_CETID + " = " + TID, null, null, null, FLD_CEEID, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; }
Question 1: In the above query, will the result set be sorted by FLD_CEEID in ascending or descending order?
Question 2: If I need to order the result set FLD_CEEID and then FLD_CEMID , how can I build an order on the parameter of this query.
Is it possible to execute several orders using this method?
source share