zoukankan      html  css  js  c++  java
  • 内置函数 和 select练习3

    19、  查询选修“3-105”课程的成绩高于“109”号同学成绩的所有同学的记录。

    select * from score where cno='3-105'and degree > (select degree from score where sno = '109'and cno='3-105');

    20 查询成绩高于学号为109”、课程号为“3-105”的成绩的所有记录。

    select * from score s where s.degree>(select degree from score s join course c on s.cno = c.cno where c.cno='3-105' and s.sno='109');

    22、查询和学号为108的同学同年出生的所有学生的SnoSnameSbirthday列。

    select sno,sname,sbirthday from student where sbirthday = (select sbirthday from student where sno = '108');

    23、查询“张旭“教师任课的学生成绩。

    select degree from score s join course c on s.cno=c.cno join teacher t on c.tno=t.tno where t.tname='张旭';

    25、查询95033班和95031班全体学生的记录。

    select * from score e join student t on e.sno = t.sno where sclass in(95031,95033)

  • 相关阅读:
    WPF 便签项目
    .NET下WPF学习之Socket通信
    DEV控件
    字符串位数补足
    VS2008设置断点不命中
    错误描述: 242000021
    关闭Win10自带的 Windows Defender
    启用与关闭 Ad Hoc Distributed Queries
    Date工具类
    数据字段脱敏
  • 原文地址:https://www.cnblogs.com/dnf1612/p/6187294.html
Copyright © 2011-2022 走看看