edit-icon download-icon

How do I add a value to a specified column?

Last Updated: Apr 11, 2018

To increase the value of a column by 1 increment, follow these steps.

  1. row = getRow(primary_key, 'col') // Read the column value.
  2. old_value = row['col'] // Record the old value of this column.
  3. row['col'] = old_value + 1 // Calculate the new value.
  4. updateRow(row, condition: row['col'] == old_value) // Write the new value to the column. You must set the condition check to make sure that this column retains the old value when writing the new value; that is, the column is not modified by others simultaneously.
Thank you! We've received your feedback.