select T.* from (select a.* from table1 a inner join table2 b on a.id=b.id)T order by T.id

解决方案 »

  1.   

    select * from
    (
    select * from 表1
    union all
    select * from 表2
    ) t
    where 条件
    order by 字段
      

  2.   

    楼主应该是这个意思吧Select * from Table1 Where 条件
    Union All
    Select * from Table2 Where 条件
    Order By 字段
      

  3.   

    我们的回答就是你要的啊Select * from 表1 Where 字段1='a'
    Union All
    Select * from 表2 Where 字段1='a'
    Order By 排序字段