php - How can I update and new table based on 3 columns from an old table? -


i have 2 tables:

  1. new_product columns:

    id_product,  id_category,  id_combination,  id_feature,  whole_sale_price,  retail_price, 
  2. 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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -