4

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"
RKh
  • 13,818
  • 46
  • 152
  • 265

1 Answers1

4

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).

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241