select min(stdid),stdname from std group by stdname

解决方案 »

  1.   

    参考:
    Select * From std Where stdid not in 
    (Select Min(stdid) From std as P Where P.stdname = stdid.stdname)
      

  2.   


    select stdid,stdname 
    from 表 
    where not exists(select 1 from 表 where stdname=a.stdname and stdid>a.stdid)
    --这里'<'或者'>'均可
      

  3.   


    select distinct stdid,stdname from std
      

  4.   

    方法有很多种的,不过
    dongdongxxx(独自爱你) 的方法不行的。
    一楼他们的都可以
    -----------
    如果你有MSN想挂金币,金币可以换钱或换奖品可以到这边注册
    http://www.5sai.com/r.do?r=123086