【单选题】
十进制数字限制:假设Schema的名字空间前缀为“xsd”,现在需要定义名为“coursegradeType”的简单类型,要求取值为[0,100]之间的小数,且小数位数只有一位,下面正确的选项是()。
①
xsd:simpleTypename=coursegradeTypexsd:restrictionbase=xsd:decimalxsd:totalDigitsvalue=1/xsd:minInclusivevalue=0/xsd:maxInclusivevalue=100//xsd:restriction/xsd:simpleType
②
xsd:simpleTypename=coursegradeTypexsd:restrictionbase=xsd:decimalxsd:totalDigits"xsd:simpleTypename=coursegradeTypexsd:restrictionbase=xsd:decimalxsdfractionDigitsvalue=1/xsd:minInclusivevalue=0/xsd:maxInclusivevalue=100//xsd:restriction/xsd:simpleType"value=1/xsd:minInclusivevalue=0/xsd:maxInclusivevalue=100//xsd:restriction/xsd:simpleType
③
xsd:simpleTypename=coursegradeTypexsd:restrictionbase=xsd:decimalxsd:totalDigitsvalue=4/xsd:minInclusivevalue=0/xsd:maxInclusivevalue=100//xsd:restriction/xsd:simpleType
④
xsd:simpleTypename=coursegradeTypexsd:restrictionbase=xsd:decimalxsd:fractionDigitsvalue=4/xsd:minInclusivevalue=0/xsd:maxInclusivevalue=100//xsd:restriction/xsd:simpleType
【单选题】
设SC表中记录成绩的列为:Grade,类型为int。若在查询成绩时,希望将成绩按‘优’、‘良’、‘中’、‘及格’和‘不及格’形式显示,正确的Case函数是( )。
①
Case Grade
When 90~100THEN优
When 80~89THEN良
When 70~79THEN中
When 60~69THEN及格
Else不及格
End
②
Case
When Gradebetween 90 and 100THENGrade = 优
When Gradebetween 80 and 89THENGrade = 良
When Gradebetween 70 and 79THENGrade = 中
When Gradebetween 60 and 69THENGrade = 及格
ElseGrade = 不及格
End
③
Case
When Gradebetween 90 and 100THEN优
When Gradebetween 80 and 89THEN良
When Gradebetween 70 and 79THEN中
When Gradebetween 60 and 69THEN及格
Else不及格
End
④
Case Grade
When 90~100THEN Grade = 优
When 80~89THEN Grade = 良
When 70~79THEN Grade = 中
When 60~69THEN Grade = 及格
ElseGrade = 不及格
End
【多选题】
模式限制:假设Schema的名字空间前缀为“xsd”,现在需要定义名为“phoneType”的简单类型,在“string”类型的基础上增加模式限制,要求是手机号码,下面正确的选项是()。
①
xsd:simpleTypename="phoneType"xsd:restrictionbase="xsd:string"xsd:patternvalue="[0,9]{11}"//xsd:restriction/xsd:simpleType
②
xsd:simpleTypename="phoneType"xsd:restrictionbase="xsd:string"xsd:patternvalue="[0,9]{11}+"//xsd:restriction/xsd:simpleType
③
xsd:simpleTypename="phoneType"xsd:restrictionbase="xsd:string"xsd:patternvalue="[0,9]{11}?"//xsd:restriction/xsd:simpleType
④
xsd:simpleTypename="phoneType"xsd:restrictionbase="xsd:string"xsd:patternvalue="[0-9]{11}"//xsd:restriction/xsd:simpleType
【单选题】
检索选修四门以上课程的学生总成绩,并要求按总成绩的降序排列出来。正确的SELECT语句是( )。
①
SELECTSNO, SUM (GRADE) FROM SC GROUP BYSNO ORDER BY2 DESC HAVING COUNT(*) >= 4;
②
SELECTSNO, SUM (GRADE) FROM SC GROUP BYSNO HAVING COUNT(*)>=4 ORDER BY2 DESC;
③
SELECTSNO, SUM (GRADE) FROM SC HAVING COUNT(*)>=4 GROUP BYSNO ORDER BY2 DESC;
④
SELECTSNO, SUM (GRADE) FROM SC ORDER BY2 DESC GROUP BYSNO HAVING COUNT(*)>=4;
【单选题】
检索选修四门以上课程的学生总成绩,并要求按总成绩的降序排列出来。正确的SELECT语句是( )。
①
A.SELECTSNO, SUM (GRADE) FROM SC GROUP BYSNO ORDER BY2 DESC HAVING COUNT(*)
②
B.SELECTSNO, SUM (GRADE) FROM SC GROUP BYSNO HAVING COUNT(*)=4 ORDER BY2 DESC;
③
C.SELECTSNO, SUM (GRADE) FROM SC HAVING COUNT(*)=4 GROUP BYSNO ORDER BY2 DESC;
④
D.SELECTSNO, SUM (GRADE) FROM SC ORDER BY2 DESC GROUP BYSNO HAVING COUNT(*)