Insert SyntaxΒΆ
MemSQL supports the following INSERT syntax:
INSERT [INTO] tbl_name [(col_name,...)]
[VALUES | VALUE] (expr,...),(...),...
[ ON DUPLICATE KEY UPDATE
col_name=expr
[, col_name=expr] ... ]
INSERT [INTO] tbl_name [(col_name,...)]
SELECT ...
[ ON DUPLICATE KEY UPDATE
col_name=expr
[, col_name=expr] ... ]
INSERT [INTO] tbl_name
SET col_name=expr, ...
[ ON DUPLICATE KEY UPDATE
col_name=expr
[, col_name=expr] ... ]
Notes:
- MemSQL supports constants or the NOW() built-in syntax for expressions (expr) for INSERTs.
- Arithmetic expressions are not currently supported.
- INSERT ... SELECTs containing table joins are not currently supported.
- INSERT queries will fail if there are concurrent ALTER TABLE, CREATE INDEX, or DROP INDEX statements running on the table, or if maximum_table_memory limit has been reached.
