Need some help? Ask here.
ASK A QUESTION.

Thanks for taking the time to reach out to us! We take support and feedback extremely seriously and will get back to you as soon as possible.

SUBMIT
QUESTION.

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.

Previous topic

Delete Syntax

Next topic

Join Syntax