我有以下SQL查询:
INSERT INTO ry_catalog_product_entity_decimal
(entity_type_id, attribute_id, store_id, entity_id, value)
SELECT entity_type_id, 290, store_id, entity_id, value
FROM ry_catalog_product_entity_decimal
WHERE attribute_id = 65;这是将Magento属性从一列复制到另一列。"290“是从”65“复制的属性。我想知道如何在"65“中增加10%的价格,并将其反映在"290”中。
谢谢。
发布于 2015-03-12 12:58:04
INSERT INTO ry_catalog_product_entity_decimal
(entity_type_id, attribute_id, store_id, entity_id, value)
SELECT entity_type_id, 290, store_id, entity_id, ((a.value * .1) + a.value) as value
FROM ry_catalog_product_entity_decimal a
WHERE attribute_id = 65;https://stackoverflow.com/questions/29002106
复制相似问题