title: How do I inner join in the same table and join foreign keys with different titles?
body: <p>Example data:</p>
  
  <pre><code>id_num: 1, 2, 3, 4
  
  name: bob, lee, john, gary
  </code></pre>
  
  <p>I'm trying to match the corresponding data in the same table with the names.</p>
  
  <pre><code> SELECT e.ID_NUM as "ID NUMBER", 
   b.NAME as "Name"
   FROM EMPLOYEE E
   JOIN EMPLOYEE B on E.ID_NUM = B.NAME
  </code></pre>
  
  <p>I get an "<strong>invalid number</strong>" error.</p>
  
  <p>My second question is, how do I join foreign keys with different names but same values in two2 different tables?</p>
  
  <pre><code>table: example1
  id_num: 1, 2, 3, 4
  
  table: example2
  emp_num: 1, 2, 3, 4
  </code></pre>
  
  <p>This is what I've done so far:</p>
  
  <pre><code>SELECT e.id_num
  FROM example1 e, 
       example2 b 
  WHERE e.id_num = b.emp_num
  GROUP BY e.id_num
  </code></pre>