A. Vindya
A. Vindya

Reputation: 117

How to delete all the entities in Azure table?

I've been working on deleting all the rows in Azure table in java. Can I do it without querying it? Thanks in advance

Upvotes: 3

Views: 3803

Answers (2)

Amor
Amor

Reputation: 8499

If I retrieve all the data, can I perform delete query on that?

If you just want to delete data, you just need to retrieve PKs and RKs. After retrieved all the data of PKs and RKs, you could perform the delete query for the entities one by one.

For complex delete query, for example, below query is not supported currently.

delete from tablename where PK = '' 

I suggest you submit your idea on Azure feedback site which is used for features request.

https://feedback.azure.com/forums/217298-storage

Upvotes: 3

Zhaoxing Lu
Zhaoxing Lu

Reputation: 6467

If you don't want to query the table, what you can do is to delete the table and recreate it.

Upvotes: 2

Related Questions