我有一张包含下一个内容的表格
stat_id|stat_type|stat_value
1 |likes |100
1 |reposts |150
是否可以将这些行克隆为另一个 stat_id
位于一个查询中?
重要的是我们需要几个新的 stat_id
的副本.
最佳答案
使用INSERT ... SELECT
insert into your_table (c1, c2, ...)
select c1, c2, ...
from your_table
where id = 1
关于php - MySQL:克隆一张表中的行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51708570/