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

前端 未结 7 819
时光取名叫无心
时光取名叫无心 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:09

    INSERT INTO dues_storage
    SELECT field1, field2, ..., fieldN, CURRENT_DATE()
    FROM dues
    WHERE id = 5;
    

提交回复
热议问题