Cursor of SQLite Query call that does not find anything matching the query criteria
What would a query call return if the query criteria isn't found in the table. Will the cursor returned be null? This is done in android.
Exampl开发者_如何学Ce:
Cursor c = rawQuery("SELECT c_name, FROM my_table, WHERE c_name = ?", "johnny");
What if there is no johnny in the column c_name? Will the cursor value be null?
A valid cursor will be returned, but it will contain no results. So checks like
if (c.moveToFirst())
will return false.
精彩评论