Reputation: 75
I know how to remove one table in Azure Table Storage but I don't know how to remove multiple tables. Is it possible?
Upvotes: 2
Views: 2399
Reputation: 13234
You will have to iterate and delete them one by one:
var tableClient = storageAccount.CreateCloudTableClient();
foreach (var table in tableClient.ListTables())
table.DeleteIfExists();
Or do the same using corresponding methods from the async api.
Upvotes: 7
Reputation: 10985
As far as I know Tables can only be deleted one at a time. The REST API exposed for Delete Table (https://msdn.microsoft.com/en-us/library/azure/dd179387.aspx) includes the table name as part of the URL when you perform the delete. So, it might be possible that an SDK exposes a way to delete multiple tables, under the hood it's going to be doing it one at a time.
Upvotes: 0