Combining UNION ALL and ORDER BY in Firebird

前端 未结 6 2182
梦谈多话
梦谈多话 2020-12-06 10:36

This is my first attempt at answering my own question, since someone may well run into this and so it might be of help. Using Firebird, I want to combine the results of two

6条回答
  •  抹茶落季
    2020-12-06 10:59

    In Firebird 1.5 this works for me

    create view V1 (C1, C2, C3) as
      select C1, C2, C3 from T1
      union all 
      select C1, C2, C3 from T2
    

    and then

    select C1, C2, C3 from V1 order by C3
    

提交回复
热议问题