Inserting data into a table
Insert statements are used to insert or add a row of data to a table in the form of:
INSERT INTO "tablename"
(First_column,... Last_column)
VALUES (First_value,... last_value);
[] = optional
As a simple example:
INSERT INTO employee
(The last, the age, the address, the city)
VALUES (' Luke ', ' Duke ', ', ' 2130 boars Nest ', ' Hazard Co ');
Note here: Each character should be surrounded by single quotes.
To insert data into a table, follow the keyword INSERT into the table name, then the left parenthesis, followed by a comma-separated list of column names, a closing parenthesis, followed by a series of values enclosed in parentheses after the keyword values. These values are the data you want to fill in the table, and they must match the specified column name. String translations are enclosed in single quotes and numbers are not used. In the example above, ' Luke ' must match column A, and 45 must match the column age.
If you want to insert the following data into the employee table;
Zhang weiguo,28, Beijing 601 P.O. Box, Beijing
Then you need to use the following SQL statement:
INSERT INTO employee
(The last, the age, the address, the city)
VALUES (' Zhang ', ' Weiguo ', 28, ' Beijing 601 box ', ' Beijing ');