Answers for "get sum sqlite android"

SQL
0

get sum sqlite android

Cursor cursor = db.rawQuery("SELECT SUM(" + DbHelper.CART_TOTAL + ") as Total FROM " + DbHelper.CART_TABLE, null);

 if (cur.moveToFirst()) {

 int total = cursor.getInt(cursor.getColumnIndex("Total"));// get final total
Posted by: Guest on August-08-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language