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":"男"}]})
举一反三
- 查询天心区的女学生的信息,正确的命令是? 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":"女"}]})
- 显示所有男生的信息,不正确的命令是? A: db.students.find({"sex":"男"}) B: db.students.find("this.sex=='男' ") C: db.students.find({"this.sex='男' "}) D: db.students.find({$where:"this.sex=='男' "})
- 统计各系男生人数,最准确的SQL语句是(<br/>)。 A: SELECT<br/>COUNT(*) FROM stduents GROUP BY d_no WHERE sex='男' B: SELECT<br/>COUNT(*) FROM students WHERE sex='男'<br/>GROUP BY d_no C: SELECT<br/>COUNT(*) FROM students WHERE sex='男'<br/>ORDER BY d_no D: SELECT<br/>COUNT(*) FROM students HAVING sex='男'<br/>GROUP BY d_no
- 查询性别为男的信息,条件怎么写 A: where sex !=’男' B: where sex not in 男 C: where sex ='男' D: where sex between 男
- 查询专业不存在的学生信息,正确的命令是? A: db.students.find({"major":null}) B: db.students.find({"major":{$in:[null],$exists:true}}) C: db.students.find({"major":{$exists:false}}) D: db.students.find({"major":{$exists:true}})
内容
- 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