select * from table where xm=
                                (select distinct xm from table)
----------------------------------------------
----------------------------------------------xm         唯一
select xm ,distinct dw from table where dw=
                                (select distinct dw from table)
----------------------------------------------
----------------------------------------------dw         唯一

解决方案 »

  1.   

    select * from table where exists (select distinct dw from table)
    select * from table where exists (select distinct xm from table)是一种交集的概念
      

  2.   

    1.我想实现显示xm唯一的记录怎么写?select xm,max(dw) from  table group by xm 2. 我想实现显示dw唯一的记录怎么写?select max(xm),dw from  table group by dw
      

  3.   

    或 1.我想实现显示xm唯一的记录怎么写?select xm,min(dw) from  table group by xm 2. 我想实现显示dw唯一的记录怎么写?select min(xm),dw from  table group by dw