我有两张表,一张product_text带有产品名称、描述和类别。另一个叫product_price与产品selling_price和cost_price。
我想product_price用通用值更新表,例如cost_priceas0.01和selling_priceas0.01
product_price对于表中存在的每一行,我需要以某种方式将此信息插入到表product_text中。
例如,如果我有:
id name description category
1 example example hats
2 example2 example2 socks
在product_text表中,我想插入:
id selling_price cost_price
1 0.01 0.01
2 0.01 0.01
到product_price表中。
我想为一百万个项目执行此操作,因此需要一种有效的方法。
请帮忙