Combining UNION ALL and ORDER BY in Firebird

前端 未结 6 2189
梦谈多话
梦谈多话 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 11:11

    Moving order by into a query tail has no effect to output datagrid.

    select * from (
        select first 1
            C1
        from T1
        order by id desc
    )
    union all
    select * from (
        select first 1
            C1
        from T2
        order by id desc
    )

提交回复
热议问题