关系模式S(A,B,C,D)代数中的σ3<’2’(S)等价于如下的( )语句。
A: SELECT *FROM S WHEREC
B: SELECTB,CFROM S WHERE C
C: SELECT B,C FROMS HAVING C
D: SELECT* FROM SWHERE’3’
A: SELECT *FROM S WHEREC
B: SELECTB,CFROM S WHERE C
C: SELECT B,C FROMS HAVING C
D: SELECT* FROM SWHERE’3’
举一反三
- 下列SQL语句中,正确的是( )。 A: SELECT S B: , SNAME FROM SC GROUP BY S C: SELECT S D: FROM SC GROUP BY S E: HAVING COUNT(*)>3 F: SELECT S G: ,Cname FROM SC GROUP BY S H: WHERE COUNT(*)>3 I: SELECT S J: FROM SC WHERE COUNT(*)>3 GROUP BY S
- 下列SQL语句中,正确的是( )。 A: SELECT S B: , SNAME FROM SC GROUP BY S C: D: SELECT S E: FROM SC GROUP BY S F: HAVING COUNT(*)>3 G: SELECT S H: ,Cname FROM SC GROUP BY S I: WHERE COUNT(*)>3 J: SELECT S K: FROM SC WHERE COUNT(*)>3 GROUP BY S L:
- 设有两个关系R(A,B)和S(B,C),与下列SELECT语句 SELECT A,B FROM R WHERE B NOT IN(SELECT BFROM SWHERE C='C56'); 等价的关系代数表达式是( )。 A: πA,B(σC≠'C56'(R⋈S)) B: πA,B(R ⋈ S) C≠'C56' C: R-πA,B(σC= 'C56'(R⋈S)) D: R-πA,B(σC≠'C56'(R⋈S))
- 查询选修了课程号为‘C2’的学生号和姓名,若用下列SQL的SELECT语句表达时, 是错误的? A: SELECT S.S B: ,SNAME FROM S WHERE S C: = (SELECT SS D: FROM SC WHERE C E: =‘C2’) F: SELECT S.S G: ,SNAME FROM S,SC WHERE S H: = SS I: AND C J: =‘C2’ K: SELECT S.S L: ,SNAME FROM S,SC WHERE S M: = SS N: AND C O: =‘C2' ORDER BY S P: Q: SELECT S.S R: ,SNAME FROM S WHERE S S: IN(SELECT SS T: FROM SC WHERE C U: =‘C2' )
- 设有关系R(A,B,C)和S(C,D)。与SQL语句select A,B,D from R,S where R.C=S.C等价的关系代数表达式是(