Ok, make sense. Understood now. Thanks. On Sunday, 1 July 2012 22:56:22 UTC+8, RichardC wrote: > > SQL statements are set based. By this I mean that unless you order the > data in the query SQL does not have to return the data in the same order > each time to make the same call. > > If I assume that you have an ID column which you can order on the the > following will work (when you remove any typos I make): > > DELETE FROM my-table WHERE my-table.id IN (SELECT id FROM my-table ORDER > BY id LIMIT 5) > > > On Sunday, July 1, 2012 3:44:23 PM UTC+1, Mystique wrote: >> >> Hi, let's say I want to delete top 5 rolls of data from the table. >> I can do a while loop with an counter call "i" and use >> "cursor.moveToPosition(i)" to move to the row and delete it. >> >> Is there a better way to do that? >> >> Thanks. >> >>
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

