Menu

SQL query to update DynamoDB records

In this post, we will look at how to alter or update records in the No-SQL DynamoDB table. The SQL language provides the UPDATE statement for modifying data. Amazon DynamoDB uses the UpdateItem operation to accomplish similar tasks.

Syntax to run the update command


UPDATE <"TableName">
SET <column name> = <value>
WHERE <column name> = <value>

e.g.

UPDATE "user"
SET enabled='true'
WHERE id='dynamoDBUser'


Here SET clause is to set the value which you want to set, and WHERE clause is to identify the right row or data from the table.

Reference:

Amazon DynamoDB SQLtoNoSQL UdateData 

2 comments: