INSERT

INSERT [LOW_PRIORITY | HIGH_PRIORITY]
[IGNORE]
[INTO] tbl_name
[PARTITION (partition_name,...)]
[(col_name,...)]
{VALUES | VALUE} ({expr | DEFAULT},...),(...),...
[ ON DUPLICATE KEY UPDATE
col_name=expr         [, col_name=expr] ...
INSERT [LOW_PRIORITY | HIGH_PRIORITY]
[IGNORE]
[INTO] tbl_name
[PARTITION (partition_name,...)]
SET col_name={expr | DEFAULT}, ...
[ ON DUPLICATE KEY UPDATE
col_name=expr         [, col_name=expr] ... ]
NSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name
[PARTITION (partition_name,...)]
[(col_name,...)]
SELECT ...
[ ON DUPLICATE KEY UPDATE
col_name=expr         [, col_name=expr] ... ]
INSERT…VALUES inserts one or more new rows by specifying the values for the specified columns. If no column name is specified, the value for every column must be provided in order.
INSERT…SET
inserts a new row by specifying the values for specific columns.
INSERT…SELECT
inserts one or more new rows by obtaining the rows from another table or tables.
If multiple value lists are inserted, MySQL returns a string in the format: ‘Records: 100 Duplicates:0 Warnings: 0’ , where records refer to the number of processed rows, duplicates the number of rows that could not be inserted because of duplicates for unique indexes, warnings the number of problematic attempts.
If the types of the inserted values do not match the defined types for the table, the inserted values may be clipped, truncated, or converted.
LOW_PRIORITY delays the insertion until the table is not being read. HIGH_PRIORITY prevents concurrent insertions. These two attributes affect only storage engines that use only table-level locking (such as MyISAM, MEMORY, and MERGE).
IGNORE causes errors to be ignored.
If ON DUPLICATE KEY UPDATE is specified, and a duplicate is found in a UNIQUE index or PRIMARY KEY, an UPDATE of the old row is performed.
To insert special characters such as the apostrophe, precede the character with a slash, eg. \’.