When Does Query Returns Null on Android?
I don't seem to find any information on query, insert or any other SQL method returning null. But it does if error occurs. I just wonder whether cursor being null means an error occured or could it mean no rows were selected (for instance)? I don't know how I should treat it - as an error or something that may happen time to time. I don't believe you ever need to check if(cursor == null) {} . First If your query doesn't return any rows, you will receive an empty Cursor. The Cursor will not be null . There are many ways to check if a Cursor is empty: if(cursor.getCount == 0) {} if(!cursor