title: Union all in DB2 SQL Query updates the order of fist table
body: <p>I am really stuck in UNION ALL join, below is senario</p>
  
  <p>if i ran this query indivisually i get below result</p>
  
  <pre><code>1) Select salary as result from employee 
     where empno = '111628548' and seqno = 4   
     order by seqno Desc
  
  result
  ------ 
  $7000
  $3000
  
  2) Select descofemp as result from empdetail
     where empno = '111628548' and seqno = 4 
     order by seqno Desc
  
  result
  ------
  very good employee
  good employee
  </code></pre>
  
  <p>above both result in string so column is same type.
  but when i join above two query with union all i get something like</p>
  
  <pre><code>With s1 as (Select salary from employee 
     where empno = '111628548' and seqno = 4   
     order by seqno Desc),
  
  s2 as (Select descofemp from empdetail
     where empno = '111628548' and seqno = 4 
     order by seqno Desc
  )
  select * from s1                                                    
  Union ALL                                                           
  select * from s2  
  
  Result
  ------
  $3000
  $7000
  very good employee
  good employee
  </code></pre>
  
  <p>You can see here the order of salary has been changed, i tried verious things but i am not able to understand why the order is changing in UNION ALL, does anybody know or faced this issue if yes could you please share some light on how to resolve it.</p>
  
  <p>Thank you in advance.</p>
  
  <p>Regards
  Mona</p>