MySQL Knowledge Base

Insert Multiple Records into a Database Using an sql File

Adding values for all columns in a table

INSERT INTO `table_name`
VALUES (value1, value2, value3, ...);

With AUTO_INCREMENT column (*) or only some columns

INSERT INTO `table_name` (
    value1,
    value2,
    value3
) VALUES (
    column1,
    column2,
    column3
), (
    column1,
    column2,
    column3
);

Example

NULL
NULL