MySQL: Multiple Inserts for a single column

前端 未结 2 682
刺人心
刺人心 2021-02-05 21:13

I\'m looking for a way to do multiple row inserts when I\'m only inserting data for a single column.

Here is the example table:

+-------+-------------+--         


        
2条回答
  •  清酒与你
    2021-02-05 21:20

    I will advise you Don't put multiple values in a column. make a new table:

         INSERT INTO table_name (id, name) VALUES (1, 'name1'), (1, 'name2'), (1, 'name3'), (1, 'name4');
    

提交回复
热议问题