Can't say that I have tried this myself, but you can perhaps "cheat"
by doing something like this

String where = "_id != -1";

You probably would not have any id fields with negative value, so in
theory, all records in the table should match that and therefore be
deleted.

Makas

On Mar 16, 1:33 pm, Hugh <[email protected]> wrote:
> Hello,
>
> Is it possible to delete all rows of a content provider's table with
> the content provider's delete() method?
>
> I see that you can delete a single row, and multiple rows, but if you
> supply no WHERE clause, will that be the same as deleting all rows? It
> does not seem to work for me:
>
> int delRows = getContentResolver().delete(MUSIC.CONTENT_URI, null,
> null);
> Log.i(TAG, "number of del rows: " + delRows);
>
> How can I accomplish leaving the table structure but emptying its
> contents using a content provider?
>
> 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

Reply via email to