title: Compare varchar values postgresql
body: <p>I'm new in the db world and I'm trying to do my first queries.</p>
  
  <p>I have two tables and I need compare the value of the <code>columnA</code>, in the first table, with the value of the <code>columnB</code> in the second table.</p>
  
  <p>I would like to know what values in the <code>columnA</code> are in the <code>columnB</code>. Both columns are <code>varchar</code> type.</p>
  
  <p>I've tried this two queries:</p>
  
  <pre><code>select *
  from tableA
  join tableB
      on (tableA.columnA = tableB.columnB);
  
  select *
  from tableA 
  where columnA in (select columnB
                    from tableB);
  </code></pre>
  
  <p>But both get me back empty table.</p>
  
  <p>I checked the values manually, and there are many equal values.</p>
  
  <p>Maybe the <code>=</code> isn't the right operator with the string values? </p>
  
  <p>This is a simple example of what I would do, with the expected result at the end.</p>
  
  <pre class="lang-none prettyprint-override"><code>TableA
  
  columnA    descriptionA   
  EF8236PA   xyx   
  EF7843DV   dgfd
  EF6535MD   dshr
  EF3274LK   hghg
  EF6940BN   fdtsg
  EF3405TJ   dsbfbs
  
  TableB
  
  columnB    
  EF3405TJ      
  EF6940BN   
  EF6535MD      
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>EF3405TJ
  EF6940BN
  EF6535MD
  </code></pre>