moveToFirst actually implemented as moveToPosition(0) . moveToPosition is the final method defined in AbstractCursor. By looking at the code, you can see that the result is partially depentandt on getCount . and it seems that in your case getCount returns a nonzero value.
See what the value of the "_id" column is, and try deleting it. Alternatively, try calling this code after re-creating the database (calling "drop table" and then "create table").
source share