December 2002
Beginner
640 pages
16h 41m
English
The INSERT statement is the primary way of getting data into a database. It takes the following format:
INSERT [LOW PRIORITY | DELAYED] [IGNORE] [INTO] table_name SET column_name1=expression1, column_name2=expression2,...
or
INSERT [LOW PRIORITY | DELAYED] [IGNORE] [INTO] table_name [(column_name,...)] VALUES (expression,...),(...)...
or
INSERT [LOW PRIORITY | DELAYED] [IGNORE] [INTO] table_name [(column_name,...)] SELECT...
The first form is a the most verbose but is in many cases the most convenient because the SET... explicitly names each column and states what value (evaluated from each expression) should be put into it.
Here's an example that adds a row of data to the subscribers table of a content management ...