title: proc sql union with different variables
body: <p>I'm trying to concatenate two tables using a <code>proc sql - union</code> where certain variables are unique to each table. Is there a way to do this without using a <code>NULL</code> placeholder variable? Basically the equivalent of the following data step.</p>
  
  <pre><code>data total;
  set t1 t2;
  run;
  </code></pre>
  
  <p>A simple example of what I'm trying to do is shown below.</p>
  
  <pre><code>data animal;
  input common $ Animal $ Number;
      datalines;
  a Ant 5
  b Bird .
  c Cat 17
  d Dog 9
  e Eagle .
  f Frog 76
  ;
  run;
  
  
  data plant;
  input Common $ Plant $ Number;
      datalines;
  g Grape 69
  h Hazelnut 55
  i Indigo .
  j Jicama 14
  k Kale 4
  l Lentil 88
  ;
  run;
  
  proc sql;
  (select animal.*, '' as plant from animal)
  union all corresponding
  (select plant.*, '' as animal from plant)
  ;
  quit;
  </code></pre>
  
  <p>I'd like to be able to run the <code>proc sql</code> with having to create the <code>plant</code> and <code>animal</code> variables in the <code>select</code> statement.</p>