title: Union to handle NULL values
body: <p>I need to write the query as below in Oracle SQL:</p>
  
  <pre><code>select a,b,null,null from table1      
  union    
  select null,null,c,d from table2    
  union     
  select null,null,null,null,e,f from table3
  </code></pre>
  
  <p>I am expecting output to be like this:</p>
  
  <pre><code>a,b,c,d,e,f
  </code></pre>
  
  <p>Edit: Sorry i had to update this question since the original question i asked was not matching with output i was expecting.</p>
  
  <p>I have tables as below:                 </p>
  
  <pre><code>TABLE1
  ---------
   A  | B
  ---------
   A1 | B1
   A2 | B2
   A3 | B3
  
  
  TABLE2
  ---------
   C  | D
  ---------
   C1 | D1
   C2 | D2
   C3 | D3
   C4 | D4
   C5 | D5
  
  
  TABLE3
  ---------
   E  | F
  ---------
   E1 | F1
   E2 | F2
   E3 | F3
   E4 | F4
   E5 | F5
   E6 | F7
   E7 | F8
  </code></pre>
  
  <p>I do not know how to write an Oracle sql which would fetch me the below output. As shown below, I need not null values to be at the start of all output fields</p>
  
  <pre><code> A        B       C       D       E        F
  ------- ------- ------- -------- -------- -------
   A1      B1      C1      D1       E1       F1
   A2      B2      C2      D2       E2       F2
   A3      B3      C3      D3       E3       F3
   null    null    C4      D4       E4       F4
   null    null    C5      D5       E5       F5
   null    null    null    null     E6       F7
   null    null    null    null     E7       F8
  </code></pre>