How to update value in existing documents in container

Aaron Manill 86 Reputation points
2022-08-18T17:44:50.763+00:00

Is it possible to write a query on the website to update an existing document, or are update queries still only available via SQL API?

I'm attempting to do something along these lines: 232591-image.png

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,543 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 29,017 Reputation points Microsoft Employee
    2022-08-19T00:14:35.4+00:00

    Hi, @Aaron Manill Thanks for posting your question in the Microsoft Q&A forum.
    It looks like you are using T-SQL. That’s the query language for SQL Server or Azure SQL Database.
    Azure Cosmos DB SQL API only supports a dialect of the SQL query language and only for queries, not operations like INSERT or UPDATE.
    To perform an operation, you would need to use the REST API or an SDK.
    In the browser-based data explorer, you can use the Items pane to manually add or update items.
    Please do refer this document here.
    Regards
    Geetha