title: How to do a FULL OUTER JOIN in KDB?
body: <p>I have 2 tables <code>x</code>,<code>y</code> in KDB:</p>
  
  <pre><code>x:([a:1 1 2 3]; b:3 4 5 6)
  q) a | b
     -----
     1 | 3
     1 | 4
     2 | 5
     3 | 6
  
  y:([a:1 2 2 4]; c:7 8 9 10)
  q) a |  c
     ------
     1 |  7
     2 |  8
     2 |  9
     4 | 10
  </code></pre>
  
  <p>I want to do the SQL-equivalent of <code>x FULL OUTER JOIN y ON x.a = y.a</code>, that is, I want the result:</p>
  
  <pre><code>([a:1 1 2 2 3 4]; b:3 4 5 5 6 0N; c:7 7 8 9 0N 10)
  q) a |   b   c
     -----------
     1 |   3   7
     1 |   4   7
     2 |   5   8
     2 |   5   9
     3 |   6 0Nj
     4 | 0Nj  10
  </code></pre>
  
  <p>From the <a href="http://code.kx.com/q/ref/joins/" rel="nofollow noreferrer">KDB reference</a>, the closest thing I could find is <a href="http://code.kx.com/q/ref/joins/#uj-ujf-union-join" rel="nofollow noreferrer"><code>uj</code></a> but does not give what I want:</p>
  
  <pre><code>x uj y
  q) a |   b   c
     -----------
     1 |   3   7
     2 |   5   8
     3 |   6 0Nj
     4 | 0Nj  10
  </code></pre>
  
  <p>So how would I do a <code>FULL OUTER JOIN</code> in KDB?</p>