字段 :   A   B   C         1   1   1
         1   1   1
         A   A   A
         A   B   C
         A   A   A 
怎么才能显示成
字段:  A  B  C        1  1  1
       A  A  A 
       A  B  C

解决方案 »

  1.   

    ??select distinct a,b,c from tablename
      

  2.   

    select distinct * from table 或select distinct a,b from table看你用哪个!
      

  3.   

    大侠 用group by 谢谢
      

  4.   

    select distinct a,b,c from tablename group by a,b,c
      

  5.   

    字段前面 能不能不带东西???
    就写成  select 字段 from 表.....
      

  6.   

    select a,b,c from tablename group by a,b,c
      

  7.   

    錯了啊?
    唉,我現在沒SQL SERVER   :)
      

  8.   

    declare @a table (A char(1),B char(1),C char(1))
    insert @a
    select   '1',   '1',   '1' union all
    select   '1',   '1',   '1' union all
    select   'A',   'A',   'A' union all
    select   'A',   'B',   'C' union all
    select   'A',   'A',   'A' select * from @a group by A,B,C
      

  9.   

    打分吧,把重复的用group by 方式就行了
      

  10.   

    select distinct a,b,c from tablename