一个表student有两列(Score,name),一个同学名字,一个是考试分数select min(Score),name from students 如果后面不用GroupBy就会出错,用了就会出一大堆。请大虾指点。如何写。
在线等待,谢谢!

解决方案 »

  1.   

    select name from  student
    where Score=(select min(Score) from student)
      

  2.   

    select * from students
    where Score = (select min(Score) from students)
      

  3.   

    select * from students 
    where Score=(select min(Score) from students)
      

  4.   

    select top 1 Score,name from 表order by Score
      

  5.   

    declare @t table(Score int,name varchar(10))
    insert into @t select 10,'aa'
    insert into @t select 30,'ba'
    insert into @t select 140,'acc'
    insert into @t select 30,'dd'
    insert into @t select 60,'ee'select * from @t a where not exists(select 1 from @t where score<a.score)
      

  6.   

    select top 1 Score,name from 表order by Score
    这个比较妙...偶稀饭
      

  7.   

    最简单的代码即可:
    SELECT TOP 1 name FROM student ORDER BY Score ASC
      

  8.   

    //select top 1 Score,name from 表order by Score
      

  9.   

    select top 1 name from table order by score