You can use the following statements to modify a JSON column:
- UPDATE. You can use the UPDATE statement to modify values of a JSON column in the SET clause.You can only update the JSON column, not individual portions of the JSON instance. Also, when referencing a JSON column in its entirety, the input format is the same as the INSERT statement.
- MERGE. You can use the MERGE statement to:
- Modify a JSON column based on the WHEN MATCHED THEN UPDATE clause.
- Insert values into a JSON column based on the WHEN NOT MATCHED THEN INSERT clause.The following MERGE statement clauses are supported on JSON functions and methods:
- The ON clause can be used to condition on a JSON instance.
- The USING clause can be used to select the JSON column value.