select * 
from t a
where id in(selec top 10 from t where type=a.type)

解决方案 »

  1.   

    select id,type,name 
      from table a 
      where a.id in (select top 10 min(id) from table group by type)
      

  2.   

    select t.* from tablename as t where t.id in(selec top 10 from t where type=t.type) order by t.type
      

  3.   

    select top 10 a.type 
    from tt a
    where  exists (select *  from tt where TYPE=a.TYPE) group by a.type
      

  4.   

    select t.* from tablename as t where t.id in(selec top 10 id from t where type=t.type) order by t.type
      

  5.   

    select top 10 * from test a
    where id in(select top 1 id from test where a.type=type)
      

  6.   

    libin_ftsafe(子陌红尘) 
    完全正确