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

前端 未结 7 801
时光取名叫无心
时光取名叫无心 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-13 00:03

    To refine the answer from Zed, and to answer your comment:

    INSERT INTO dues_storage
    SELECT d.*, CURRENT_DATE()
    FROM dues d
    WHERE id = 5;
    

    See T.J. Crowder's comment

提交回复
热议问题