title: How to UPDATE from a Select in sql?
body: <p>A little personal project i'm doing, kinda new in sql.
  Lets say i have a table with multiples columns, but i want to work with 2 for this request: CODE and VALUE</p>
  <p>Basically, the codes are like this : 1_A, 1_B, 1_C, 2_A, 2_B, 2_C, 3_A, 3_B, 3_C, etc... They are already created.
  What i want to do is replace the VALUE from the C codes with the A codes: 1_A -&gt; 1_C, 2_A-&gt;2_C, and so on. Without touching the other colmuns
  What i thougt so far is :</p>
  <p><code>update TABLE set Value = (select value from TABLE from CODE like '%A%') where CODE like '%C%'</code></p>
  <p>But how do make sure that the Value associated with the code X_A gets copied into X_C specifically ? Like, so 1_A gets copied into 1_C and not 2_C. Maybe it has to do with JOIN, but honestly i don't get how those work yet</p>
  <p>Edit : it's on oracle</p>