Azure Comos DB Portal SQL Cheat Sheet

By Stephen Garside on 12/1/2017

Microsoft Azure ComosDB SQL Query Cheat Sheet and Examples

I have recently had the opportunity to use Cosmos DB in Microsoft Azure for a project , so have started to pull together a cheat sheet for all the different things I find out on my travels - hope you find it useful!

 

SQL Query Where Cosmos DB Contains Or Like

SELECT * FROM C WHERE CONTAINS(c.id, "RK0305500")

 

SQL Query Where Cosmos DB Field Name Contains a Space

SELECT * FROM C WHERE CONTAINS(c["Product Level"], "Level 1")

 

Total Document Count In Azure DB Collection

SELECT VALUE COUNT(1) FROM c

Share this article...
Join the Discussion...