Outdated Version
You are viewing an older version of this section. View current production version.
DELETE
Delete data in a table.
DELETE FROM tbl_name
[WHERE expr]
[LIMIT row_count]
Notes
row_count- maximum row count limit.DELETEqueries may fail if themaximum_memorylimit has been reached.- This command must be run on the master aggregator or a child aggregator node (see Node Requirements for MemSQL Commands).
- MemSQL does not yet fully support multi-table
DELETEstatements. Subqueries in theWHEREclause are the only multi-tableDELETEallowed.
Example
memsql> DELETE FROM mytbl WHERE seq=1;
Query OK, 3 rows affected (0.04 sec)
memsql> DELETE FROM mytbl WHERE id IN (SELECT id from myother) LIMIT 10;
Query OK, 10 rows affected (0.02 sec)