select 字段1,...,
from (select top 100 * from 表A) a group by 字段1 

解决方案 »

  1.   

    select * from 表A group by 字段1 having count(*)<=100
      

  2.   

    每组100条以内
    select * from 表A group by 字段1 having count(*)<=100
    对前100记录分组
    select 字段1,max(字段1)...
    from (select top 100 * from 表A) b
      

  3.   

    set col1 from (select top 100 * from 表A)AA group by 字段1 
      

  4.   

    select 字段1,...,
    from (select top 100 * from 表A) a group by 字段1 
    为什么from 后面还要表a