你可能感兴趣的试题
SELECTS. S#,SNAMEFROM S WHERE S. S#=(SELECTSC)S# FROM SC WHERE C#=’C2’ SELECTS.S#,SNAMEFROMS,SC WHERES.S#=SC.S# AND C#=’C2’ SELECTS.S#,SNAME FROM S,SC WHERES.S#=SC.S# AND C#=’C2’ORDER BY S.S# SELECTS.S#,SNAME FROM S WHERE S.S# IN (SELECT SC) S# FROM SC WHERE C#=’C2’
SC.G>='B' SC.G<='B' SC.G>'B' SC.G<'B'
SELECTS.学号,姓名,平均成绩FROMS,SC;
WHERES.学号=SC.学号;
GROUP BY S.学号HAVING GOUNT(*)>=5 ORDER BY 平均成绩 DESC SELECT 学号,姓名,AVG(成绩)FROMS,SC;
WHERE S.学号=SC.学号 AND COUNT(*)>=5;
GROUP BY 学号 ORDER BY 3 DESC SELECT S.学号,姓名,AVG(成绩)平均成绩FROM S,SC;
WHERE S.学号=SC.学号 AND COUNT(*)>=5;
GROUP BY S.学号ORDER BY平均成绩DESC SELECT S.学号,姓名,AVG(成绩)平均成绩FROM S,SC;
WHERE S.学号=SC.学号;
GROUP BY S.学号 HAVING COUNT(*)>=5 0RDER BY 3 DESC
SELECT S#,SNAMEFROMS WHERE S#=(SELECTSS# FROMSC WHERE C#=’C2’ SELECTS#,SNAMEFROMS,SC WHERES#=SS# AND C#=’C2’ SELECTS#,SNAME FROM S,SC WHERES#=SS# AND C#=’C2’ORDER BY S# SELECTS#,SNAME FROM S WHERE S# IN (SELECT S S# FROM SC WHERE C#=’C2’
SELECT S#,SNAME FROM,S WHERE SNAME='刘%' SELECT S#,SNAME FROM S WHERE SNAME='刘_' SELECT S#,SNAME FROM S WHERES NAME LIKE'刘%' SELECT S#,SNAME FROM S WHERES NAME LIKE'刘'
SG>='B' SG<='B' SG≥'B' SG≤'B'
SELECT DISTINCTSname SELECT DISTm CTSname
FROMS FROMS
WHERE EXISTS WHERE 0<
(SELECT* (SELECTCOUNT(*)
FROM SPJ FROM SPJ
WHERE S.Sno=SPJ.SnO WHERE S.Sno;SPJ.Sno
AND SPJ.Pno;,P3, AND SPJ.Pno=’P3’) SELECT Shame SELECT Sname
FROMS FROMS,SPJ
WHERE EXISTS WHERES.Sno=SPJ.Sno
(SELECT* ANDSPJ.Pno=’P3’)
FROM SPJ GROUP BYSname
WHERE S. Sno=SPJ. Sno
AND SPJ. Pno=’P3’)
SELECT DISTINCT Sname
FROMS
WHERE EXISTS
(SELECT*
FROM SPJ
WHERE S. Sno=SPJ. SnO
AND SPJ.Pno=’P3’) SELECT DISTmCT Sname
FROMS
WHERE 0<
(SEIECT COUNT (*)
FROM SPJ
WHERES.Sno=SPJ.Sno
AND SPJ.Pno=’P3’) SELECT Sname
FROMS
WHERE EXISTS
(SELECT*
FROM SPJ
WHERES.Sno=SPJ.Sno
ANDSPJ.Pno=’P3’) SELECT Sname
FROMS,SPJ
WHERES.Sno=SPJ.Sno
ANDSPJ.Pno=’P3’)
GROUP BYSname
SELECT DISTINCT Sname SELECT DISTmCT Sname
FROMS FROMS
WHERE EXISTS WHERE 0<
(SELECT * (SEIECT COUNT (*)
FROM SPJ FROM SPJ
WHERE S.Sno=SPJ.SnO WHERE S.Sno=SPJ.Sno
AND SPJ.Pno= ’P3’) AND SPJ.Pno= ’P3’) SELECT Sname SELECT Sname
FROMS FROMS, SPJ
WHERE EXISTS WHERES.Sno=SPJ.Sno
(SELECT * AND SPJ.Pno= ’P3’)
FROM SPJ GROUP BYSname
WHERE S.Sno=SPJ.Sno
AND SPJ.Pno= ’P3’)
SELECT S.姓名,SC.课程号,SC.成绩FROM S WHERES.学号=SC.学号 SELECT S.姓名,SC.课程号,SC.成绩FROM SC WHERES.学号=SC.成绩 SELECT S.姓名,SC.课程号,SC.成绩FROM S,SC WHERE S.学号=SC.学号 SELECT S.姓名,SC.课程号,SC.成绩FROM S,SC
SC.G>='B' SC.G<='B' SC.G≥'B' SG≤'B&
SG>='B' SG<='B' SG>'B' SG<'B'
SC.G>='B' SC.G<='B' SC.G>'B' SC.G<'B'
SG>='B' SG<='B' SG≥'B& SG≤'B&