本帖最后由 tjdghk 于 2009-10-22 12:10:30 编辑

解决方案 »

  1.   

    select distinct id,add1,add2,add3,add4 from A;
      

  2.   

    select id,          add1,        add2 ,         add3,          add4
    from XXXX
    group by id,          add1,        add2 ,         add3,          add4
      

  3.   

    晕,distinct就搞定了select distinct id,add1,add2,add3add4 from tableA 
     
      

  4.   

    经测试:sql语句如下select id,add1,add2,add3,add4
    from test
    group by id,add1,add2,add3,add4 order by id;
      

  5.   

    6楼的需要加排序select distinct id,add1,add2,add3,add4 from test order by id;
      

  6.   

    就是说在id相同的情况下,比较add1到add4, 如果都相等,就只抽出一条 不用说的这么复杂,不就是取消重复的数据么?distinct就搞定了。