[MySQL] inserting multiple rows with one query

 INSERT INTO VALUE()

How did I encounter this?

There could be multiple release dates or platforms per game. In this case, the query to date_platform_table might need to insert multiple rows at once. INSERT statement supports this by using `VALUES`

Syntax

INSERT INTO table_name (column1, column2, column3, ...)
VALUES
  (valueA1, valueA2, valueA3, ...),
  (valueB1, valueB2, valueB3, ...),
  (valueC1, valueC2, valueC3, ...);


Explanation

  • Each parenthesized group corresponds to one row.

Comments