Combining UNION ALL and ORDER BY in Firebird

前端 未结 6 2190
梦谈多话
梦谈多话 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条回答
  •  猫巷女王i
    2020-12-06 10:56

    How about:

    select C1, C2, C3 from T1
    union all 
    select C1, C2, C3 from T2
    order by 2
    

    At least in the newer Firebird Versions it works if you order by "Number" instead of using an Alias.

提交回复
热议问题