Get record count in Azure DocumentDb

后端 未结 8 1834
孤街浪徒
孤街浪徒 2021-02-03 18:44

It seems like \'select count(*) from c\' in the SQL queries allowed by documentdb in the azure site and through the documentdb explorer (https://studiodocumentdb.codeplex.com/)

8条回答
  •  庸人自扰
    2021-02-03 19:15

    Until the implementation of the "count" keyword, you should do your query in a store procedure on the server. Take care to not get all columns/properties in your query if you want only a count.

    Select only the id like;

      dc.CreateDocumentQuery(update.SelfLink, "SELECT c.id FROM c")
    

提交回复
热议问题