有三个表:student(sno,sname,ssex,sage,sdept),表示学号,姓名,性别,年龄,所在系。course(cno,cname,cpno,ccredit),表示课程号,课程名,先行课程号,学分。sc(sno,cno,grade),表示学号,课程号,成绩。建立存储过程,根据输入的课程号,获取课程的名称;不用调用存储过程Createorreplaceprocedureselect_cname(var_cnoincourse.cno%type,var_cnameoutcourse.cname%type,)IsBeginSelectcnameintovar_cnameFromcourseWherecno=var_cno;End;()
有三个表:student(sno,sname,ssex,sage,sdept),表示学号,姓名,性别,年龄,所在系。course(cno,cname,cpno,ccredit),表示课程号,课程名,先行课程号,学分。sc(sno,cno,grade),表示学号,课程号,成绩。建立存储过程,根据输入的课程号,获取课程的名称;不用调用存储过程Createorreplaceprocedureselect_cname(var_cnoincourse.cno%type,var_cnameoutcourse.cname%type,)IsBeginSelectcnameintovar_cnameFromcourseWherecno=var_cno;End;()
A.SELECT Cno, AVG(Score) FROM SCS GROUP BY Score ORDER BY 2, Cno Desc B.SELECT Cno, AVG(Score) FROM SCS GROUP BY Cno ORDER BY 2, Cno Desc C.SELECT Cno, AVG(Score) FROM SCS WHERE Cno, Desc GROUP BY Score D.SELECT Cno, AVG(Score) FROM SCS GROUP BY, AVG(Score) ORDER BY, Cno Desc
A.SELECT Cno, AVG(Score) FROM SCS GROUP BY Score ORDER BY 2, Cno Desc B.SELECT Cno, AVG(Score) FROM SCS GROUP BY Cno ORDER BY 2, Cno Desc C.SELECT Cno, AVG(Score) FROM SCS WHERE Cno, Desc GROUP BY Score D.SELECT Cno, AVG(Score) FROM SCS GROUP BY, AVG(Score) ORDER BY, Cno Desc
检索选课人数少于4人的课程号。正确的SQL语句是( ) A: SELECT CNO FROM SC WHERE COUNT(*)<;4 B: SELECT CNO FROM SC GROUP BY CNO HAVING COUNT(*)<;4 C: SELECT DISTINCT CNO FROM SC ORDER BY CNO D: SELECT CNO FROM SC WHERE COUNT(CNO)<;4
检索选课人数少于4人的课程号。正确的SQL语句是( ) A: SELECT CNO FROM SC WHERE COUNT(*)<;4 B: SELECT CNO FROM SC GROUP BY CNO HAVING COUNT(*)<;4 C: SELECT DISTINCT CNO FROM SC ORDER BY CNO D: SELECT CNO FROM SC WHERE COUNT(CNO)<;4
在“学生-选课-课程”数据库中的3个关系如下:S(SNO, SNAME, SEX, AGE); C(CNO, CNAME, TEACHER);SC(SNO, CNO, GRADE),查询既选修了“2”号又选修了“4”号课程的学生学号。若用关系代数表达式来表示为( )。 A: ПSNO (σCNO=’2’(SC) ∩ σCNO=’4’(SC) ) B: ПSNO (σCNO=’2’(SC)) ¥ ПSNO(σCNO=’4’(SC) ) C: ПSNO (σCNO=’2’(SC) ∪ σCNO=’4’(SC) ) D: σCNO=’2’(SC) ¥σCNO=’4’(SC)
在“学生-选课-课程”数据库中的3个关系如下:S(SNO, SNAME, SEX, AGE); C(CNO, CNAME, TEACHER);SC(SNO, CNO, GRADE),查询既选修了“2”号又选修了“4”号课程的学生学号。若用关系代数表达式来表示为( )。 A: ПSNO (σCNO=’2’(SC) ∩ σCNO=’4’(SC) ) B: ПSNO (σCNO=’2’(SC)) ¥ ПSNO(σCNO=’4’(SC) ) C: ПSNO (σCNO=’2’(SC) ∪ σCNO=’4’(SC) ) D: σCNO=’2’(SC) ¥σCNO=’4’(SC)
在MySQL中,假设有学生选课表SC(sno,cno,score)。那么列出所有选修课程超过5门的学生学号以及选修课程数目,其正确的SQL语句为()。 A: select sno,count(cno)from scwhere count(cno)>=5; B: select sno,count(cno)from scgroup by sno where count(cno)>=5; C: select sno,count(cno)from scgroup by sno having count(cno)>=5; D: select sno,count(cno)from scgroup by cno having count(cno)>=5;
在MySQL中,假设有学生选课表SC(sno,cno,score)。那么列出所有选修课程超过5门的学生学号以及选修课程数目,其正确的SQL语句为()。 A: select sno,count(cno)from scwhere count(cno)>=5; B: select sno,count(cno)from scgroup by sno where count(cno)>=5; C: select sno,count(cno)from scgroup by sno having count(cno)>=5; D: select sno,count(cno)from scgroup by cno having count(cno)>=5;
设随机变量X的方差存在,Var(X)>0,则以下结论正确的是 A: Var(X) > Var(1-X) B: Var(X) < Var(1-X) C: Var(X) = Var(1-X) D: Var(X) + Var(1-X) = 1
设随机变量X的方差存在,Var(X)>0,则以下结论正确的是 A: Var(X) > Var(1-X) B: Var(X) < Var(1-X) C: Var(X) = Var(1-X) D: Var(X) + Var(1-X) = 1
main() { int var, *p; var=100; *p=&var; var=*p+10; printf("%d",var); }运行结果:
main() { int var, *p; var=100; *p=&var; var=*p+10; printf("%d",var); }运行结果:
统计每门课程的选课人数select cno , _________from scgroup by ________ A: count(*) ; cno B: count(sno) ; cno C: count(*) ; sno D: count(sno) ; sno
统计每门课程的选课人数select cno , _________from scgroup by ________ A: count(*) ; cno B: count(sno) ; cno C: count(*) ; sno D: count(sno) ; sno
检索选修课程“C2”的学生中成绩最高的学生的学号。正确的SELECT语句是()。 A: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ( SELECT GRADE FORM SC WHERE CNO='C2' ); B: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); C: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE NOT IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); D: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ALL ( SELECT GRADE FORM SC WHERE CNO='C2' );
检索选修课程“C2”的学生中成绩最高的学生的学号。正确的SELECT语句是()。 A: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ( SELECT GRADE FORM SC WHERE CNO='C2' ); B: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); C: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE NOT IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); D: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ALL ( SELECT GRADE FORM SC WHERE CNO='C2' );
根据下面的定义,F0(3+4)的输出结果是_______(注意没有空格)#defineF1(var)printf("var=%d",var)#defineF0(var)F1(var*var)
根据下面的定义,F0(3+4)的输出结果是_______(注意没有空格)#defineF1(var)printf("var=%d",var)#defineF0(var)F1(var*var)