select * from security; | ||||
---|---|---|---|---|
id | account | date | code | amount |
31 | a | 2019-07-24 | x1 | 5000 |
32 | c | 2019-07-24 | x2 | 5000 |
现在,我需要产生下面的表
两条已有的数据重复一遍,仅仅修改date字段
id | account | date | code | amount |
---|---|---|---|---|
31 | a | 2019-07-24 | x1 | 5000 |
32 | c | 2019-07-24 | x2 | 5000 |
33 | a | 2019-07-25 | x1 | 5000 |
34 | c | 2019-07-25 | x2 | 5000 |
insert into tableName (date,account,code,amount) values ( select "20190725" as date ,account,code,amount from tableName where date="20190724");
为何不能达到预计的效果?
如何改写?