How does mysql insert multiple pieces of data?
How to insert multiple pieces of data in mysql: 1. Use the “INSERT INTO table name field list VALUES (value 1) … , (value n);” statement to insert data; 2. Use “INSERT INTO table name SET Field 1 = value 1, field 2 = value 2,…” statement inserts data. INSERT INTO [ [ , … ] ] VALUES (value 1) [… , (value n) ]; The syntax is explained as follows. : Specify the name of the table to be operated. : Specify the column name that needs to insert data. If you want to insert data into all columns in the table, all column names can be omitted, just use INSERT VALUES(…) directly. VALUES or VALUE clause: This clause contains a list of data to be inserted. The order of the data in the data list should correspond to the order of the columns. 2) INSERT…SET statement The syntax format is: INSERT INTO SET = , = , … This statement is used to directly specify the corresponding column values for certain columns in the table, that is, the column name of the data to be inserted is specified in the SET clause, col_name is the specified column name,…