Java tutorial
//package com.java2s; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; public class Main { public static int getNbTravail(SQLiteDatabase db) { Cursor res = db.rawQuery("SELECT count(*) FROM travail", null); res.moveToFirst(); return res.getInt(0); } }