Chapter 6. Modifying Table Rows using Update Statements

Table of Contents

Example Data
Changing Field Values
Modifying Array Values
Adding Elements to an Array
Changing an Existing Element in an Array
Removing Elements from Arrays
Modifying Map Values
Removing Elements from a Map
Adding Elements to a Map
Updating Existing Map Elements
Managing Time to Live Values
Avoiding the Read-Modify-Write Cycle

This chapter provides examples on how to update table rows using SQL for Oracle NoSQL Database Update Statements. These statements provide an efficient mechanism for updating table row data because they perform server-side updates. That is, the table data is updated at the server without requiring a Read/Modify/Write update cycle.


Update statements can only be used to update an existing row. They cannot be used to create new rows, or delete existing rows. Further, an update can only modify a single row at a time.

The Update Statement syntax is described in SQL Update Statements..

Example Data

This chapter's examples uses the data loaded by the SQLJSONExamples script, which can be found in the Examples download package. For details on using this script, the sample data it loads, and the Examples download, see See SQLJSONExamples Script.