下面代码输出为____________。 grade=70 if grade>=0: print('不及格') elif grade>=60: print('及格')
第1题:
检索选修四门以上课程的学生总成绩(不统计不及格的课程),并要求按总成绩降序排列出来,正确的SELECT语句是______。
A.SELECT S#,SUM(GRADE)FROM SC WHERE GRADE>=60 CROUP BY S# ORDER BY 2 DESC HAVING COUNT(*)>=4
B.SELECT S#,SUM(GRADE)FROM SC WHERE GRADE>=60 GROUP BY S# HAVING COUNT(*)>=4 ORDER BY 2 DESC
C.SELECT S#,SUM(GRADE)FROM SC WHERE GRADE>=60 HAVING COUNT(*)>=4 GROUP BY S# ORDER BY 2 DESC
D.DELECT S#,SUM(GRADE)FROM SC WHERE GRADE>=60 ORDER BY 2 DESC CROUP BY S# HAVING COUNT(*)>=4
第2题:
已知关系模式:sc(sno, sname, grade),各属性含义依次为学号、课程名、分数。要查找“数据库”课分数最高的学生的学号,正确的SQL语句是
A.SELECT sno FROM sc WHERE sname="数据库" AND grade=MAX(grade)
B.SELECT sno FROM sc FOR sname="数据库" OR grade>=MAX(grade)
C.SELECT sno FROM sc WHERE sname="数据库" AND grade=(SELECT MAX(grade) FROM sc
D.SELECT sno FROM sc FOR sname="数据库" OR grade=(SELECT MAX (grade) FROM sc
第3题:
有如下程序: infocase$=InputBox("Inputoneletter:") Select Case infocase$ case"a" grade$="Verygood" case"b" grade$="Good" case"C" grade$="OK" case"d" grade$="Qualified" case Else grade$="Bab" End Select
A.Very good
B.Good
C.Bad
D.Qualified
第4题:
在关系SC中,查询学习课程号为'OB',且成绩在60至90之间的学生学号的正确的 SQL命令是
A.SELECT SNO FROMSC WHERE CNO='DB' AND GRADE BETWEEN 60 AND 90
B.SELECT SNO FROM SC WHERE CNO='DB' OR GRADE BETWEEN 60 AND 90
C.SELECT SNO FROM SC WHERE CNO='DB' AND GRADE>=60 AND 90
D.SELECTSNO FROM SCWHERECNO='DB' AND GRADE<=60 AND GRADE>=90
第5题:
对于数据表:student(sno,sname,sex,age,grade),查询学习成绩为空的学生的学号和姓名,下面语句正确的是______。
A.SELECT sno,sname FROM student WHERE gade=NULL
B.SELECT sno,sname FROM student WHERE grade IS NULL
C.SELECT sno,age FROM student WHERE grade IS NULL
D.SELECT mo,age FROM student WHERE grade=NULL
第6题:
对于学生信息表:student(sno,sname,sex,age,grade),查询学习成绩为空的学生的学号和姓名,下面语句正确的是
A.SELECT sno,sname FROM student WHERE grade=NULL
B.SELECT sno,sname FROM student WHERE grade IS NULL
C.SELECT sno,age FROM student WHERE grade IS NULL
D.SELECT sno,age FROM student WHERE grade=NULL
第7题:
设有关系模式:SC(sno,cno,grade),各属性含义依次是学号、课程号、分数。要查询分数低于60分的学生学号,正确的SQL语句是______。
A) SEI,ECT sno FROM SC WH ERE grade BETWEEN O AND 60
B) SELECT sno FROM SC WHERE grade<60
C) SELECT sno FROM SC HAVlNG grade BETWEEN O AND 60
D) SELECT sno FROM SC HAVING grade<60
A.
B.
C.
D.
第8题:
(24 )若要查询 “ 成绩不及格学生的学号 ” ,则正确的关系代数表达式是
A ) ∏ sno (SC)
B ) σ grade<60 (SC)
C ) ∏ sno ( σ grade<60 (SC))
D ) σ grade<60 ( ∏ sno (SC))
第9题:
Camphor oil is classified as a ______.
A.Grade A flammable liquid
B.Grade C flammable liquid
C.Grade D combustible liquid
D.Grade E combustible liquid
第10题:
在linux系统中,更改组class的组名为grade,应执行()命令。
第11题:
学生选课信息表:sc(sno,cno,grade),主键为(sno,cno),从学生选课信息表中找出无成绩的元组的SQL语句是()。
第12题:
Carrier-Grade NET
Carrier-Grade Network
Carrier-Grade Networking
Carrier-Grade NAT
第13题:
在关系SC中,查询学习课程号为′DB′,且成绩在60至90之间的学生学号的正确的 SQL命令是
A.SELECT SNO FROM SC WHERE CNO=′DB′AND GRADE DETWEEN 60 AND 90
B.SELECT SNO FROM SC WHERE CNO=′DB′OR GRADE BETWEEN 60 AND 90
C.SELECT SNO FROM SC WHERE CNO=′DB′AND GRADE>=60 AND 90
D.SELECT SNO FROM SC WHERE CNO=′DB′AND GRADE<=60 AND GRADE>=90
第14题:
有如下的SQL语句:
Ⅰ.SELECT sname FROMs,sc WHERE grade<60
Ⅱ.SELECT sname FROMs WHERE sno IN(SELECT sno FROM sc WHERE grade<60
Ⅲ.SELECT sname FROMs,sc WHERE s.sno=Sc.sno AND grade<60
若要查找分数(grade)不及格的学生姓名(sname),以上正确的有哪些? ( )
A.Ⅰ和Ⅱ
B.Ⅰ和Ⅲ
C.Ⅱ和Ⅲ
D.Ⅰ、Ⅱ和Ⅲ
第15题:
已知x代表某个百分制成绩,下列程序段用于显示对应的五级制成绩,正确的是( )
A.If x>=60 Then Print"及格" Else If x>=70 Then Print"中" Else If x>=80 Then Print"良" Else If x>=90 Then Print"优" Else Print"不及格" End If
B.If x<90 Then Print"良" Else If x<80 Then Print"中" Else If x<70 Then Print"及格" Else If x<60 Then Print"不及格" Else Print"优" End If
C.If x>=90 then Print"优" Else If x>=80 Then Print"良" Else If x>=70 Then Print"中" Else If x>=60 Then Print"及格" Else Print"不及格" End If End Select
D.Select Case x Case x>=90 Print"优" Case x>=80 Print"良" Case x>=70 Print"中" Case x>=60 Print"及格" Case Else Print"不及格"
第16题:
若要使所有学科80分以上的成绩都增加5%, 80至60分的成绩都增加10%,应如何更新数据库( )。 A.UPDATE SC SET GRADE=GRADE*1.05 WHERE SC.GRADE>=80 UPDATE SC SET GRADE=GRADE* 1.10 WHERE SC.GRADE>=60 AND SC.GRADE <=80 B.UPDATE SC SET GRADE=GRADE* 1.10 WHERE SC.GRADE>=60 AND SC.GRADE<=80 UPDATE SC SET GRADE=GRADE* 1.05 WHERE SC.GRADE>=80 C.UPDATE SC SET GRADE=GRADE* 1.05 WIRE SC.GRADE>=80 AND SET GRADE =GRADE* 1.10 WHARE SC.GRADE>=60 D.UPDATE SC SET GRADE=GRADE* 1.10 WHERE SC.GRADE>=60 AND SC.GRADE <=80 AND SET GRADE=GRADE* 1.05 WHERE SC.GRADE>=80
第17题:
有如下的SQL语句:
Ⅰ.SELECT sname FROMs,sc WHERE grade<60
Ⅱ.SELECT sname FROM WHERE sno IN (SELECT sno FROM sc WHERE grade<60)
Ⅲ.SELECT sname FROMs,sc WHERE s.sno=Sc.sno AND grade<60
若要查找分数(grade)不及格的学生姓名(sname),以上正确的有( )。
A.Ⅰ和Ⅱ
B.Ⅰ和Ⅲ
C.Ⅱ和Ⅲ
D.Ⅰ、Ⅱ和Ⅲ
第18题:
设在SQL Server 2008某数据库中有表SC(Sn0,Cn0,Grade),其中Grade列的类型为int。若在查询成绩时,希望将成绩按“优”、“良”、“中”、“及格”和“不及格”形式显示,则下列Case函数中正确的是( )。
A.Case GradeWhen Grade between 90 and 100 THEN Grade=ˊ优ˊWhen Grade between 80 and 89 THEN Grade=ˊ良ˊWhen Grade between 70 and 79 THEN Grade=ˊ由ˊWhen Grade between 60 and 69 THEN Grade=ˊ及格ˊElse Grade=ˊ不及格ˊEnd
B.Case GradeWhen Grade between 90 and 100 THEN ˊ优ˊWhen Grade between 80 and 89 THEN ˊ良ˊWhen Grade between 70 and 79 THENˊ中ˊWhen Grade between 60 and 69 THENˊ及格ˊElseˊ不及格ˊEnd
C.CaseWhen Grade between 90 and 100 THEN Grade=ˊ优ˊWhen Grade between 80 and 89 THEN Grade=ˊ良ˊWhen Grade between 70 and 79 THEN Grade=ˊ由ˊWhen Grade between 60 and 69 THEN Grade=ˊ及格ˊElse Grade=ˊ不及格ˊEnd
D.CaseWhen Grade between 90 and 100 THENˊ优ˊWhen Grade between 80 and 89 THEN ˊ良ˊWhen Grade between 70 and 79 THEN ˊ由ˊWhen Grade between 60 and 69 THEN ˊ及格ˊElseˊ不及格ˊEnd
第19题:
检索选修四门以上课程的学生总成绩(不统计不及格的课程),并要求按总成绩的降序排列出来。正确的SELECT语句是______。
A.SELECT S#, SUM(GRADE) FROM SC WHERE GRADE>=60 GROUP BY S# ORDER BY 2 DESC HAVING COUNT(*)>=4
B.SELECT S#, SUM(GRADE) FROM SC WHERE GRADE>=60 GROUP BY S# HAVING COUNT(*)>=4 ORDER BY 2 DESC
C.SELECT S#, SUM(GRADE) FROM SC WHERE GRADE>=60 HAVING COUNT(*)>=4 GROUP BY S# ORDER BY 2 DESC
D.SELECT S#, SUM(GRADE)FROM SC WHERE GRADE>=60 ORDER BY 2 DESC GROUP BY S# HAVING COUNT(*)>=4
第20题:
12.
A. grade one,class four
B. class four,grade one
C. Grade One,Class Four
D. Class Four,Grade One
第21题:
设SC表中记录成绩的列为:Grade,类型为int。若在查询成绩时,希望将成绩按‘优’、‘良’、‘中’、‘及格’和‘不及格’形式显示,正确的Case函数是()。
A Case Grade When 90~100 THEN ’优’ When 80~89 THEN ’良’ When 70~79 THEN ’中’ When 60~69 THEN ’及格’ Else ’不及格’ End
B Case When Grade between 90 and 100 THEN Grade = ’优’ When Grade between 80 and 89 THEN Grade = ’良’ When Grade between 70 and 79 THEN Grade = ’中’ When Grade between 60 and 69 THEN Grade = ’及格’ Else Grade = ’不及格’ End
C Case When Grade between 90 and 100 THEN ’优’ When Grade between 80 and 89 THEN ’良’ When Grade between 70 and 79 THEN ’中’ When Grade between 60 and 69 THEN ’及格’ Else ’不及格’ End
DCase Grade When 90~100 THEN Grade = ’优’ When 80~89 THEN Grade = ’良’ When 70~79 THEN Grade = ’中’ When 60~69 THEN Grade = ’及格’ Else Grade = ’不及格’ End
第22题:
设在某SELECT语句的WHERE子句中,需要对Grade列的空值进行处理。下列关于空值的操作,错误的是()。
第23题:
候选小区评估使用Grade算法,En_Load_Order=Enable时,GRADE(n)的计算与下面哪些因素有关?()
第24题:
Case Grade When 90~100 THEN ’优’ When 80~89 THEN ’良’ When 70~79 THEN ’中’ When 60~69 THEN ’及格’ Else ’不及格’ End
Case When Grade between 90 and 100 THEN Grade = ’优’ When Grade between 80 and 89 THEN Grade = ’良’ When Grade between 70 and 79 THEN Grade = ’中’ When Grade between 60 and 69 THEN Grade = ’及格’ Else Grade = ’不及格’ End
Case When Grade between 90 and 100 THEN ’优’ When Grade between 80 and 89 THEN ’良’ When Grade between 70 and 79 THEN ’中’ When Grade between 60 and 69 THEN ’及格’ Else ’不及格’ End
Case Grade When 90~100 THEN Grade = ’优’ When 80~89 THEN Grade = ’良’ When 70~79 THEN Grade = ’中’ When 60~69 THEN Grade = ’及格’ Else Grade = ’不及格’ End