title: Compare 2 columns in different tables mysql
body: <p>I have two tables that contain business info the first one lets call it A has (id,info,category) the second one lets call it B has (id,phone,category).</p>
  
  <p>The A.info contains address, phone and other info.
  The B.phone contains just a phone number.</p>
  
  <p>I would like to set the B.category as the A.category where the B.phone exists in A.info.</p>
  
  <p>I was thinking something like that:</p>
  
  <pre><code>update A
  inner B
  set B.category = A.category
  where B.phone like %A.phone%
  </code></pre>
  
  <p>With no luck offcourse</p>