title: sqlite - python - full outer join with attaching a database
body: <p>I have 2 tables in 2 databases:</p>
  
  <p><strong>table</strong> <code>call</code> in <code>history.db</code>:</p>
  
  <pre><code>ROWID | ADDRESS | DATE 
  1     | +98765  | 1396771532    
  2     | +98765  | 1396771533    
  3     | +98765  | 1396771534    
  4     | +98765  | 1396771535    
  5     | +98765  | 1396771536    
  6     | +98765  | 1396771537    
  7     | +98765  | 1396771538    
  8     | +98765  | 1396771539    
  9     | +98765  | 1396771510
  </code></pre>
  
  <p><strong>table</strong> <code>info</code> in <code>voices.db</code>:</p>
  
  <pre><code>ID    | CALLID  | PATH       | CODE    
  1     | 2       | voice1.m4a | 12234    
  2     | 5       | voice2.m4a | 12234    
  3     | 1       | voice4.m4a | 89765
  </code></pre>
  
  <p>First, I did an attach:</p>
  
  <pre><code>conn = sqlite3.connect("history.db")
  conn.row_factory = sqlite3.Row
  cursor = conn.cursor()
  
  cursor.execute("attach ? as voice", ("voices.db",))
  conn.commit()
  </code></pre>
  
  <p>Then, I joined 2 tables:</p>
  
  <pre><code>cursor.execute("SELECT * FROM call c JOIN (SELECT PATH, CALLID, CODE FROM voice.info WHERE CODE = ?) f ON c.ROWID = f.CALLID ORDER BY c.DATE", ("12234",))
  </code></pre>
  
  <p>So, I got the following result:</p>
  
  <pre><code>ROWID | ADDRESS | DATE       | PATH       | CALLID | CODE    
  2     | +98765  | 1396771533 | voice1.m4a | 2      | 12234    
  5     | +98765  | 1396771536 | voice2.m4a | 5      | 12234
  </code></pre>
  
  <p>But, I need a full outer join to get something like:</p>
  
  <pre><code>ROWID | ADDRESS | DATE       | PATH       | CALLID | CODE    
  1     | +98765  | 1396771532 | NULL       | NULL   | NULL    
  2     | +98765  | 1396771533 | voice1.m4a | 2      | 12234    
  3     | +98765  | 1396771534 | NULL       | NULL   | NULL    
  4     | +98765  | 1396771535 | NULL       | NULL   | NULL    
  5     | +98765  | 1396771536 | voice2.m4a | 5      | 12234    
  6     | +98765  | 1396771537 | NULL       | NULL   | NULL    
  7     | +98765  | 1396771538 | NULL       | NULL   | NULL    
  8     | +98765  | 1396771539 | NULL       | NULL   | NULL    
  9     | +98765  | 1396771510 | NULL       | NULL   | NULL
  </code></pre>
  
  <p>I tried <a href="https://stackoverflow.com/questions/1923259/full-outer-join-with-sqlite">this</a>, but I got an error of <code>... UNION do not have same number result columns ...</code>.</p>
  
  <p><strong>How could I have a full outer Join?</strong></p>
  
  <p>I am using Python 2.7, so</p>
  
  <blockquote>
    <p>Right and FULL OUTER JOINs are not currently supported</p>
  </blockquote>