举一反三
- Where is the woman from Where is the woman from A: Australia. B: B.Canada. C: C.England.
- 下列查询中,属于相关子查询的有()。 A: SELECT * FROM student WHERE sno IN (SELECT sno FROM sc WHERE cno='1'); B: SELECT sno, cno FROM SC x WEHRE grade>=(SELECT AVG(grade) FROM SC y WHERE y.sno = x.sno); C: SELECT sname FROM student WHERE EXISTS(SELECT * FROM sc WHERE sno=student.sno AND cno='1'); D: SELECT sname FROM student WHERE NOT EXISTS(SELECT * FROM course WHERE NOT EXISTS(SELECT * FROM sc WHERE sc.sno=student.sno AND sc.cno=course.cno));
- 查询所有成绩均大于80分的学生姓名,应执行( )语句 A: SELECT SNAME FROM STUDENT WHERE EXISTS (SELECT *FROM SC WHERE STUDENSNO = SC.SNO AND GRADE> 80); B: SELECT SNAME FROM STUDENT WHERE EXISTS (SELECT *FROM SC WHERE STUDENSNO = SC.SNO AND GRADE C: SELECT SNAME FROM STUDENT WHERE NOT EXISTS (SELECT *FROM SC WHERE STUDENSNO = SC.SNO AND GRADE D: SELECT SNAME FROM STUDENT WHERE NOT EXISTS (SELECT *FROM SC WHERE STUDENSNO = SC.SNO AND GRADE> 80);
- Where is Mr. Brown from? He is from
- 查询成绩大于90分的学生的姓名,正确的SQL命令是( ) A: select 姓名 from 学生表 where 学号=(select 学号 from 成绩表 where 成绩>90) B: select 姓名 from 学生表 where 学号 in (select 学号 from 成绩表 where 成绩>90) C: select 姓名 from 学生表 where 学号>(select 学号 from 成绩表 where 成绩>90) D: select 姓名 from 学生表 where 学号90)
内容
- 0
下列 SQL 语句select * from student where sno = '05880101'union select * from student where sno = '05880102'与此查询语句等价的选项是( )。 A: select * from student where sno= '05880101' and sno= '05880102' B: select * from student where sno= '05880101' or sno= '05880102' C: select * from student where sno= '05880101' D: select * from student where sno= '05880102'
- 1
Zaroff is a guy not to be messed with because:
- 2
检索那些城市至少有一个仓库的职工年龄在60以上的正确语句是( )。 A: SELECT城市FROM仓库WHERE仓库号 IN;SELECT仓库号FROM职工WHERE年龄>60 B: SELECT城市FROM仓库WHERE仓库号 IN;(SELECT仓库号FROM职工WHERE年龄>60) C: SELECT仓库号FROM职工WHERE年龄>60 IN;SELECT城市FROM仓库WHERE仓库号 D: SEIECT仓库号FROM职工WHERE年龄>60IN;(SELECT城市FROM仓库WHERE仓库号)
- 3
下列有关子菜单的说法中,错误的是( )。 A: SELECT姓名FROM学生表WHERE EXISTS;(SELECT学号FROM成绩表WHERE成绩>90) B: SELECT姓名FROM学生表WHERE EXISTS;(SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90) C: SELECT姓名FROM学生表WHERE学号EXISTS;(SELECT学号FROM成绩表WHERE学号=学生表.学号AND成绩>90) D: SELECT姓名FROM学生表WHERE学号=;(SELECT学号FROM成绩表WHERE成绩>90)
- 4
在所有学生中查询比计算机系学生平均年龄大的学生姓名,可以使用的查询语句是: A: SELECT Sname FROM Student WHERE Sage > ( SELECT AVG(Sage) FROM Student ); WHERE Sdept = 'CS' B: SELECT Sname FROM Student WHERE Sage > AVG( SELECT Sage FROM Student WHERE Sdept = 'CS' ); C: SELECT Sname FROM Student WHERE Sage > ( SELECT AVG(Sage) FROM Student WHERE Sdept = 'CS' ); D: SELECT Sname FROM Student WHERE AVG(Sage) > ( SELECT Sage FROM Student WHERE Sdept = 'CS' );