Delete Documents from CosmosDB based on condition through Query Explorer

后端 未结 4 1305
天涯浪人
天涯浪人 2021-02-18 14:56

What\'s the query or some other quick way to delete all the documents matching the where condition in a collection?
I want something like DELETE * FROM c WHE

4条回答
  •  时光取名叫无心
    2021-02-18 15:20

    I want something like DELETE * FROM c WHERE c.DocumentType = 'EULA' but, apparently, it doesn't work.

    Deleting documents this way is not supported. You would need to first select the documents using a SELECT query and then delete them separately. If you want, you can write the code for fetching & deleting in a stored procedure and then execute that stored procedure.

提交回复
热议问题