title: replacing rows with no primary key mysql
body: <p>I have 2 tables. table A and table B as shown in the picture along with desired result:</p>
  
  <p><a href="https://i.stack.imgur.com/aWGIZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aWGIZ.png" alt="enter image description here"></a></p>
  
  <p>The combination of id1 and id2 is unique. I want to replace the contents of the rows of table A with those in table B ( as seen in the desired result, the amount in row 1 and row 4 has been changed to reflect that in table B while retaining other rows of table A). What would be the best way to achieve this? Can REPLACE be used here ( with no single column as primary key). </p>