title: Correct way to perform Sql self union
body: <p>Let's say we have table as below: </p>
  
  <pre><code>table1:
  
  **t1**   **t2**   **t3**
   abc       xyz      aaa
  </code></pre>
  
  <p>Can i do something like: </p>
  
  <pre><code>select * from(
  (select t.t1,t.t2,t.t3 from table1 t) as tmp
  union
  (select tmp2.t1,'someothervalue' as t2,tmp2.t3 from tmp tmp2)) as result
  order by result.t1
  </code></pre>
  
  <p>Basically union operation with the first tmp table itself. 
  Let's say t1,t2,t3 all are of varchar type.</p>