请说出该程序段的功能。declare @e numeric(5,2)declare @ c1 int, @ c2 int, @ c3 int, @ c4 intset @ c1=0; set @ c2 =0; set @ c3=0; set @ c4=0declare xxx cursorfor select 成绩 from scoreopen xxxfetch xxx into @ cwhile @'@ fetch_status = 0beginif(@c > =90) set @cl =@ e1 +1;else if( @ c > =70) set @ c2 =@ c2 +1;else if(@ c> =60) set @ c3 =@ c3 +1;else set @ c4 = @ c4 + 1fetch from xxx into @ cendclose xxxdeallocate xxxprint 优秀生人数:'+sb(@ c1,5);print食好生人数:'+str(@ c2,5);print及格生人数:'+str(@ c3,5);print及格生人数:'+sh(@ c4,5)
请说出该程序段的功能。
declare @e numeric(5,2)
declare @ c1 int, @ c2 int, @ c3 int, @ c4 int
set @ c1=0; set @ c2 =0; set @ c3=0; set @ c4=0
declare xxx cursor
for select 成绩 from score
open xxx
fetch xxx into @ c
while @'@ fetch_status = 0
begin
if(@c > =90) set @cl =@ e1 +1;
else if( @ c > =70) set @ c2 =@ c2 +1;
else if(@ c> =60) set @ c3 =@ c3 +1;
else set @ c4 = @ c4 + 1
fetch from xxx into @ c
end
close xxx
deallocate xxx
print 优秀生人数:'+sb(@ c1,5);
print食好生人数:'+str(@ c2,5);
print及格生人数:'+str(@ c3,5);
print及格生人数:'+sh(@ c4,5)
相关考题:
TableTAB1wascreatedusingthefollowingstatement:CREATETABLEtab1(c1INT,c2INT,c3INT,c4INT,c5INT);IfcolumnC1isuniqueandqueriestypicallyaccesscolumnsC1andC2together,whichstatement(s)willcreateindex(es)thatwillprovideoptimalqueryperformance?()A.CREATEUNIQUEINDEXxtab1ONtab1(c1)include(c2)B.CREATEUNIQUEINDEXxtab1ONtab1(c1);CREATEINDEXxtab2ONtab1(c3)INCLUDE(c2)C.CREATEUNIQUEINDEXxtab1ONtab1(c2,c1)D.CREATEUNIQUEINDEXxtab1ONtab1(c2)INCLUDE(c1)
补体经典途径的激活顺序是 A、C3→C5→C9B、C1→C2→C4→C3→C5→C9C、C1→C4→C2→C3→C5→C9D、C1→C2→C3→C4→C5→C9E、C1→C3→C2→C4→C5→C9
补体经典途径反应的次序是A、C1→C2→C3…→C9B、C1→C3→C2→C4……→C9C、C1→C2→C3→C5……→C9D、C1→C4→C2→C3→C5……→C9E、C3→C5→C6……→C9
设有表T,现要在该表新增加一个列,列名为:c1,类型为int。下列能实现该功能的语句是()。AALTER TABLE T ADD COLUMN c1 intBALTER TABLE T ADD (c1 int)CALTER TABLE T ADD COLUMN c1DALTER TABLE T ADD c1
声明一个类型为int类型的变量i,并将其复制为10。该过程的正确语句是()A.set @i=10 delcare int iB.declare @i int set @i=10C.declare @i int set i=10D.delclare @int i = 10
声明一个类型为int类型的变量i,并将其赋值为10。该过程的正确语句是()。A.delclare @int i = 10B.set @i=10 delcare int iC.declare @i int set i=10D.declare @i int set @i=10
3、写出下列程序段的功能 MOV AH,1 INT 21H AND AL,0FH MOV BL,AL MOV AH,1 INT 21H SHL AL,4 AND AL,BL