• 2022-06-01
    17e0a6a212da224.gif关系代数练习-学生选课(题干).docx根据附件内容,查询所在院系是信息工程学院、软件学院、网络空间学院这三个学院的学生姓名、性别和所在院系,正确的SQL语句是()。
    A: select sName,sSex,sDept from student where sDep='信息工程学院' and sDept='软件学院' and sDept='网络空间学院';
    B: select sName,sSex,sDept from student where sDep='信息工程学院' or sDept='软件学院' or sDept='网络空间学院';
    C: select sName,sSex,sDept from student where sDept in('信息工程学院','软件学院','网络空间学院');
    D: select sName,sSex,sDept from student where sDept on('信息工程学院','软件学院','网络空间学院');
  • B,C

    举一反三

    内容

    • 0

      查询“学生基本情况表”中,“信息学院”所有女生的记录,正确的SQL语句是( )。 A: Select * From 学生基本情况表 Where 学院 ="信息学院" Or 性别="女" B: Select * From 学生基本情况表 Where 学院 ="信息学院" ,性别="女" C: Select * From 学生基本情况表 Where 学院 ="信息学院" And 性别="女" D: Show From 学生基本情况表 Where 学院 ="信息学院" And 性别="女"

    • 1

      要在student(sno,sname,ssex,sage,sdept)表中,查询全体女生的姓名、年龄,以下正确的查询语句是( )。 A: select * from student where ssex='女' B: select 姓名, 年龄 from student where 性别 ='女' C: select sname , sage from student where ssex='女’ D: select sname 姓名, sage 年龄 from student where ssex='女'

    • 2

      17e0a6a212da224.gif关系代数练习-学生选课(题干).docx根据附件内容,查询学生表,统计“软件学院”和“网络空间学院”的学生人数,并汇总这两个学院共有多少学生。 A: selectsDept,count(*)fromstudentwheresDeptin('软件学院','网络空间学院')groupbysDeptwithrollup; B: selectsDept,count(*)fromstudentwheresDeptin('软件学院','网络空间学院')groupbysDept; C: selectsDept,count(*)fromstudentgroupbysDeptwheresDeptin('软件学院','网络空间学院')withrollup; D: selectsDept,count(*)fromstudentwheresDept='软件学院'orsDept='网络空间学院'groupbysDeptwithrollup;

    • 3

      在student(sno,sname,ssex,sage,sdept)表中,查询学生姓名中包含“大”或“小”的学生信息。以下查询语句正确的是( )。 A: select * from student where sname in( '_[大小]%') B: select * from student where sname ='%大%' or sname='%小%' C: select * from student where sname like'%大%' or sname like'%小%' D: select * from student where sname like '%[大小]%'

    • 4

      使用教学(STC)数据库,与如下查询语句等价的是( )。 SELECT *FROM Student WHERE Sdept = 'CS' EXCEPT SELECT * FROM Student WHERE Sage <= 19; A: SELECT * FROM Student WHERE Sdept = 'CS' AND Sage > 19 B: SELECT * FROM Student WHERE Sdept = 'CS' AND Sage <= 19 C: SELECT * FROM Student WHERE Sdept = 'CS' OR Sage <= 19 D: SELECT * FROM Student WHERE Sdept = 'CS' OR Sage > 19