谁能告诉我如何在 SQLITE 中获得最高数字并将其设置为 TextView?
public Cursor MaxPrice() {
Cursor m = ourDatabase.rawQuery("SELECT MAX( " + Pro_Price + " ) FROM "+ TABLE_NAME + " " , null);
return m;
}
这是其他类的另一部分:
Database dbb = new Database(this);
dbb.open();
String Hexpense = dbb.MaxPrice();
tvHighestExpense.setText( Hexpense);