title: SQL update table when condition from another row
body: <p>how to add together this schema?</p>
  
  <pre><code>update ps_product_shop set price.2=price.1/25.5 where id_product = *the_same* 
  price.1 -&gt; id_shop=1
  price.2 -&gt; id_shop=2
  id_product -&gt; the same for both shops
  </code></pre>
  
  <p>It is in prestashop, table with prices. In table ps_product_shop, I have on row1 id_shop = 1 and ond row2 id_shop=2</p>
  
  <p>I need to update my prices for two different currency shops.</p>
  
  <p>Take "price" from id_shop=1, divide it 25.5 (CZK / EUR) and set it to price for id_shop=2</p>
  
  <p>I was several years before Oracle db administrator, but I am out of ths bussiness now... :)</p>
  
  <p>Thank you. Komanche</p>
  
  <p>update:
  it is mysql, I tagged it MySQL in the thread start...</p>
  
  <p>in the table,</p>
  
  <p>row....id_product....id_shop....price</p>
  
  <p>row1...12............1..........500</p>
  
  <p>row2...12............2..........8</p>
  
  <p>I need to update row 2 with price/25.5</p>