I am a programming newbie and I found this piece of code in the internet and it works fine
Cursor c=db.query(DataBase.TB_NAME, new String[] {DataBase.KEY_ROW
if (c.moveToFirst()) { while(!c.isAfterLast()) { // If you use c.moveToNext() here, you will bypass the first row, which is WRONG ... c.moveToNext(); } }