For detail explanation I'll show you and example.
We have 2 tables named `product` and `purchase`:
Table: product:
Table:puchase:
SQL Update:
UPDATE product p
INNER JOIN purchase pp
ON p.itemcode = pp.itemcode
SET p.price = pp.purcaseprice * 1.5
INNER JOIN purchase pp
ON p.itemcode = pp.itemcode
SET p.price = pp.purcaseprice * 1.5
Result:
Click here if you like this article.
0 Comments