php - How can I update and new table based on 3 columns from an old table? -
i have 2 tables:
new_product
columns:id_product, id_category, id_combination, id_feature, whole_sale_price, retail_price,
old_product
columns:id_product, id_category, id_combination, id_feature, whole_sale_price, retail_price,
how can update data columns whole_sale_price
, retail_price
on new_product
using value columns whole_sale_price
, retail_price
old_product
using key id_category
, id_combination
, id_feature
?
in general way write follows:
update table1 target, (select column1, column2 table2) source set target.column3 = source.column1 target.column4 = source.column2
Comments
Post a Comment