可以
select distinct top 4 col_name from tablename
可以用的

解决方案 »

  1.   

    在一个sql句中不行.但你可以这样写
    set rowcount N --N是你要的行数
    select distinct 字段 from 表
    set rwocount 0
      

  2.   

    那么再问一下:
    多个字段的 col1,col2,col3,如果只对col1 distinct,如下就是错误的结果集select distinct top 4 col1,col2,col3 from tablename怎么只对col1 distinct,然后order by col2呢? 谢谢
      

  3.   

    例如:Pubs數據庫下的authors表
    select distinct top 4 au_lname,au_fname from authors
    order by au_fname
    結果:
    au_lname                                 au_fname             
    ---------------------------------------- -------------------- 
    Bennet                                   Abraham
    Yokomoto                                 Akiko
    Ringer                                   Albert
    Dull                                     Ann
      

  4.   

    楼主可以用max,或min来
    select distinct top 4 col1,max(col2) co12,min(col3) co13 from tablename
    group by col1
    order by col2
    试一下这个看看能否满足要求