Total Page Preview:   000000013392

How to use WHERE clause in Azure DocumentDB

In this article we will use WHERE clause in azure DocumentDB or Azure cosmos DB.

WHERE Clause:

The WHERE clause is used in database to filter records with  specify a condition from the table(in SQL) or document(in NoSQL).

WHERE Clause Syntax:

SELECT column1, column2, ...

FROM document_name
 
WHERE condition;
 
Example: 
 
SELECT 
  u.FirstName,
  u.LastName,
  u.MobileNo,
  u.EmailId,
  u.Address,
  u.Salary 
 
FROM User u
WHERE
(
    u.Address   =   "Noida"
AND u.Salary    >    1
AND u.Salary    <   10000
)
 

OUTPUT:

 
 
 
Thanks,
Brijesh Kumar

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments