Outdated Version
                
                You are viewing an older version of this section. View current production version.
DELETE
Deletes data from a table.
Syntax
DELETE FROM tbl_name
    [WHERE expr]
    [LIMIT row_count]
Remarks
- row_count- maximum row count limit.
- DELETEqueries may fail if the- maximum_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.
- Writing to multiple databases in a transaction is not supported.
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)
