数据库

作者: c667ec5a71d8 | 来源:发表于2019-04-12 23:04 被阅读0次

    from Student,SC

    where Student.S#=SC.S# and C# in (select C# from SC where S#='1001');

    11、删除学习“叶平”老师课的SC表记录;

    Delect SC

    from course ,Teacher

    where Course.C#=SC.C# and Course.T#= Teacher.T# and Tname='叶平';

    12、查询各科成绩最高和最低的分:以如下形式显示:课程ID,最高分,最低分

    SELECT L.C# 课程ID,L.score 最高分,R.score 最低分

    FROM SC L ,SC R

    WHERE L.C# = R.C#

    and

    L.score = (SELECT MAX(IL.score)

    FROM SC IL,Student IM

    WHERE IL.C# = L.C# and IM.S#=IL.S#

    GROUP BY IL.C#)

    and

    R.Score = (SELECT MIN(IR.score)

    FROM SC IR

    WHERE IR.C# = R.C#

    GROUP BY IR.C# );

    1

    相关文章

      网友评论

          本文标题:数据库

          本文链接:https://www.haomeiwen.com/subject/vylkwqtx.html