Skip to content

UPDATE

Updates one or more rows in a table. Works with both normal and Big Data storage.

Syntax

UPDATE tableName
  SET column1 = value [, column2 = value, ...]
  [WHERE ...]

No WHERE = update all rows

If you omit the WHERE clause, all rows in the table will be updated.

The value in SET must be a constant (string, number, or boolean). Expressions and functions are not supported in SET — see not supported features for alternatives.

The same column restrictions and multi-value rules as INSERT apply. Not all column types can be written via SQL — see column writability for details.

LIMIT is not supported in UPDATE statements.

Setting values to NULL

To clear a cell, set the column to NULL. Setting a text column to an empty string "" also results in NULL — see NULL values.

UPDATE Contacts SET City=NULL WHERE Name="Alice"

Response

UPDATE returns success: true on success. The response does not include the number of affected rows. If no rows match the WHERE condition, the response is still success: true.

{
  "success": true,
  "metadata": null,
  "results": null
}

Examples

Update a single column:

UPDATE Contacts SET Adult=true WHERE Age>=18

Update multiple columns at once:

UPDATE Contacts SET Adult=true, `Age group`="18+" WHERE Age>=18