• 2022-11-03
    查询天心区的男学生的信息,正确的命令是?
    A: db.students.find({"address":"天心区"},{"sex":"男"})
    B: db.students.find({"address":"天心区","sex":"男"})
    C: db.students.find({$and:{"address":"天心区","sex":"男"}})
    D: db.students.find({$and:[{"address":"天心区"},{"sex":"男"}]})
  • D

    内容

    • 0

      3个表即学生表S、课程表C和学生选课表SC,它们的结构如下: S(S#,SN,SEX,AGE,DEPT)C(C#,CN)SC(S#,C#,GRADE)其中:S#为学号,SN为姓名,SEX为性别,AGE为年龄,DEPT为系别,C#为课程号,CN为课程名,GRADE为成绩。检索选修课程名称为“DB”的男生中的最高成绩,正确的SELECT语句是____。 A: SELECT MAX(GRADE) FROM SC WHERE CN='DB’ AND SEX='男' B: SELECT MAX(GRADE) FROM SC,C,SWHERE CN='DB' AND SEX='男' C: SELECT MAX(GRADE) FROM SC,S WHERE SC D: =C E: AND CN='DB' AND SEX='男' F: SELECT MAX(GRADE) FROM SC,C,SWHERE SC G: =C H: AND SS I: =S.S J: AND CN='DB' AND SEX='男'

    • 1

      查询成绩在60-80之间的学生信息,正确的语句是? A: db.students.find({"score":{$gte:60,$lte:80}}) B: db.students.find({"score":{$gte:80},{"score":{$lte:60}}}) C: db.students.find({"score":{$gte:60},{"score":{$te:80}}}) D: db.students.find({"score":{$gt:80},{"score":{$lt:60}}})

    • 2

      下面 语句和”select * from student where sex=’男’ && age=20;”语句查询出的结果是一样的。( ) A: select * from student where sex=’男’ or age=20; B: select * from student where sex=’男’ || age=20; C: select * from student where sex=’男’ and age=20; D: select * from student where sex,age in(’男’,20);

    • 3

      数据库中有一张表名称为Student,有列Name,Age,IDCard,Sex。要求查询所有男同学信息,下列哪个SQL语句是正确的 A: Select * From Student Where Sex '男' B: Select * From Student Where Sex ='女' C: Select * From Student Where Sex In '男' D: Select * From Student Where Sex ='男'

    • 4

      Studies in single-sex schools show that ______. A: smaller class brings lower achievements of the students B: special attention encourages the students to do better in class C: single sex is the only factor that influences the students' behaviors D: single sex helps the students learn more in class