UPDATE using data from SELECT

From Lennie, 5 Years ago, written in SQL, viewed 388 times.
URL http://paste.security-portal.cz/view/bb8b2bc3 Embed
Download Paste or View Raw
  1. -- how to update some table using data from other table?
  2.  
  3. UPDATE ps_product_shop psps, ps_product psp
  4.     SET
  5.     psps.id_category_default = psp.id_category_default,
  6.     psps.id_tax_rules_group = psp.id_tax_rules_group,
  7.     psps.date_upd = NOW()
  8. WHERE psps.id_product = psp.id_product;
  9.  
  10.  

Reply to "UPDATE using data from SELECT"

Here you can reply to the paste above