I want to display table field ExpNo in TextView, Please help me to write query in cursor or which way that you know…
Sql Query is like : Select Max(ExpNo) from table;
(how to write this query in android)
please help me…
i was write like :
public void dispExpNo()
{
String[] exno = {"ExpNo"};
Cursor c = db.query("tb_expense",exno,null,null,null,null,null);
txtExpno.setText(""+c.getInt(0));
c.close();
}
you can use a rawQuery if you want like this:
or you can use the standard android query also like this: