问题
Is it possible to delete from a document collection using SQL in CosmosDB?
I am looking for a Delete SQL similar to SELECT as below:
SELECT *
FROM Families f
WHERE f.id = "AndersenFamily"
I am looking for something:
SELECT *
FROM Families f
WHERE f.id = "AndersenFamily"
回答1:
Is it possible to delete from a document collection using SQL in CosmosDB?
As of today it is not possible to do so. You will need to fetch the documents using SELECT
query and then delete the documents individually using DELETE Document
API (or appropriate delete method based on the SDK you're using).
来源:https://stackoverflow.com/questions/48338989/delete-sql-for-cosmosdb