解决方案 »

  1.   


    打个括号就让我先order by 再 union啊
      

  2.   

    第一种:from和where相同,意思是结果集一样了,那union不是重复数据了?
    第二种,from和where不同,那选的结果集中字段是一样的吧?那你的意思是要把第二条sql语句拉的数据剔除第一条数据的结果吗?
      

  3.   


    select * from (select top 999 * from tabel order by id)t  
    union all
    select * from (select top 999 * from tabel order by id2)t1如果你要排序,就得分开来排序,第一部分排前面,第二部分排后面,各有各的排序。
    而且要多嵌套一次查询,因为order by 后不能跟 union