Delete a row from mongodb database in azure

前提是你 提交于 2019-12-25 04:57:21

问题


I am an azure newbie who has a mongodb database on Azure cloud storage. I am trying to delete a row with a specific value from the Query explorer in Azure, but I keep getting this error. Am I missing something?

delete from users where _id='...' doesnt work neither does delete * from users where _id='' work

this works perfectly even if am doing SQL on a mongodb database while querying


回答1:


I think you are using Microsoft DocumentDB (not mongoDB). DocumentDB is available on Azure and supports SQL-like queries.

I suggest taking a look at the documentation: https://azure.microsoft.com/en-us/documentation/articles/documentdb-sql-query/

According to the docs INSERT, UPDATE, and DELETE are only available through the REST API and not in the query language.



来源:https://stackoverflow.com/questions/40112551/delete-a-row-from-mongodb-database-in-azure

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