public static boolean queryIsEmpty ( SQLiteDatabase db , String table ) { long isEmpty = longForQuery ( db , "select exists(select 1 from " + table + ")" , null ) ; return isEmpty == 0 ; }
Query the table to check whether a table is empty or not