Delete SQL for CosmosDB [duplicate]

末鹿安然 提交于 2019-12-11 01:22:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!