Outdated Version
You are viewing an older version of this section. View current production version.
UPDATE
Update data in a table.
UPDATE tbl_name
SET col_name1=expr [, col_name2=expr] ...
[WHERE expr]
[LIMIT row_count]
Notes
- MemSQL does not currently support the full multi-table
UPDATE
syntax.IN
orEXISTS
Subqueries in theWHERE
clause of anUPDATE
are supported. UPDATE
queries will fail ifmaximum_table_memory
limit has been reached.- This command must be run on the master aggregator or a child aggregator node (see Node Requirements for MemSQL Commands ).
Example
mysql> UPDATE mytbl
SET vehicle_id='X3023X';
mysql> UPDATE mytbl
SET vehicle_id='X3023X'
WHERE vehicle_model IN (SELECT model FROM all_models);