数据库的表在这里下载
http://weihao.trighost.com/12.JPG查询选学"3-105"课程的成绩高于"109"号学生成绩的所有学生记录,并按成绩从高到低排列。

解决方案 »

  1.   

    select *  from  score where cno= '3-105' 
    and degree>109  order by degree desc
      

  2.   


    select *
    from 表名
    where cno='3-105' and degree>(select top 1 degree from 表名 where cno='3-105' and cno='109')
    order by degree desc
      

  3.   

    select *
    from score
    where cno='3-105' and degree>(select top 1 degree from score where cno='3-105' and cno='109')
    order by degree desc
      

  4.   

    不行!我有答案,就是不明白,请高手指教.select x.sno,x.cno,x.degree from
    score x,score y 
    where x.cno='3-105'and x.degree>y.degree and y.sno = '109' and y.cno='3-105'
    order by x.degree desc
      

  5.   

    select x.sno,x.cno,x.degree from
    score x,score y 
    where x.cno='3-105'and x.degree>y.degree and y.sno = '109' and y.cno='3-105'
    order by x.degree desc
    -----------------
    这个写错了吧
    select x.sno,x.cno,x.degree from
    score score x,score y 这样才可以
      

  6.   

    你那只是简写,便于饮用,你说是写  score 快,还是写x快啊
      

  7.   

    为什么最后要“y.cno='3-105'“而“x.cno='3-105'“就不行呢?
      

  8.   

    select x.sno,x.cno,x.degree from
    score x,score y 
    where x.cno='3-105'
        and x.degree>y.degree 
        and y.sno = '109' 
        and y.cno='3-105'
    order by x.degree desc为什么最后要“y.cno='3-105'“而“x.cno='3-105'“就不行呢?
    -------------------------------------------------------------
    因为第一个条件已经限制了“x.cno='3-105'”,而同时也要限制“y.cno='3-105'”。
      

  9.   

    SELECT * FROM 学生表,score s
    WHERE 
    学生表.学生号='s.sno'
    s.cno = '3-105'
    AND s.degree>109
    ORDER BY degree
      

  10.   

    select sno from score where cno = '3-105' and degree > (select degree from score where name = '109')
    order by degree
      

  11.   

    where x.cno='3-105'and x.degree>y.degree and y.sno = '109' and y.cno='3-105'X中 选3--105的 ||  X成绩大于Y的 ||  其中Y的值为y.sno = '109' and y.cno='3-105'的