这个排序是按什么顺序??没有顺序就按照department分组:try:
     select * from table1,table2 
     where table1.id=table2.id
     group by department

解决方案 »

  1.   

    select * from table1,table2 
         where table1.id=table2.id
         order by table1.department
      

  2.   

    Select t1.id,t1.name,t1.department ,t2.money 
      From  table1 t1 left join table2 t2 on t1.id=t2.id
    order by t1.department
      

  3.   

    select a.id,a.name ,a.department, b.money from table1 a,table2 b 
    where a.name=b.name order by department
      

  4.   

    select a.id,a.department,b.money from table1 a , table2 b where a.id=b.id order by a.department