title: SQL Union two tables and keep table name in a column
body: <p>I am trying to UNION two tables whilst retaining information about which table the entry is from.</p>
  
  <p>For example, given this input </p>
  
  <pre><code>Table A
  Column1   Column2
     0         X
     1         Y
  
  Table B
  Column1   Column2
     3         Z
     1         Y
  </code></pre>
  
  <p>I want to end up with this:</p>
  
  <pre><code>Table C
  Column1   Column2 Column3
     0         X        A
     1         Y        A
     3         Z        B
  </code></pre>
  
  <p>I tried an INSERT INTO statement but I can't insert different text in Column3 without getting all the duplicates from e.g. Table 2</p>