【单选题】设在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
【单选题】设在SQL Server 2008某数据库中有销售表(商品号,销售时间,销售数量,销售价格),其中商品号的类型为char(6),销售价格的类型为int。现要定义统计指定商品销售总价的标量函数。有下列定义该标量函数的语句:Ⅰ.Create FUNCTION db0.GetTotal(@GoodID char(6))Returns int ASBEGINReturn(SELECT SUM(销售价格)F...
【简答题】设在SQL Server 2008某数据库中,已建立了四个文件组:fg1、f92、f93和f94,以及一个分区函数RangePF1。RangePF1的定义代码如下:CREATE PARTITION FUNCTION RangePFl(int)AS RANGE LEFT FOR VALUES(100,200,300)(1)请基于RangePFl创建一个分区方案RangePSl,每个分区对应一个文件组...