MYSQL: How to copy an entire row from one table to another in mysql with the second table having one extra column?

前端 未结 7 799
时光取名叫无心
时光取名叫无心 2020-12-12 23:48

I have two tables with identical structure except for one column... Table 2 has that additional column in which i would insert the CURRENT_DATE()

I would like to cop

7条回答
  •  無奈伤痛
    2020-12-12 23:49

    Just wanted to add this little snippet which works beautifully for me.

    INSERT INTO your_target_table SELECT * FROM your_rescource_table WHERE id = 18;

    And while I'm at it give a big shout out to Sequel Pro, if you're not using it I highly recommend downloading it...makes life so much easier

提交回复
热议问题