题目内容

[说明] 根据下面所给的AAA数据库,或者按照下列所给的每条SQL查询语句写出相应的功能,或者按照下列所给的每种功能写出相应的SQL查询语句。 假设使用名称为AAA的数据库,它包括Students(学号char(8),姓名varchar(8),年龄 int,专业varchar(20),入学日期Date Time)和Score(学号char(8),课程名varchar(10),成绩 numeric(5,2))两张表。 [问题3] 请说出该程序段的功能。 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)

查看答案
更多问题

[说明] 设有三个关系: BOOK (BNO,BNAME,PUBLISH_YEAR,PRICE,PRESS) READ(RNO,RNAME,DUTY) BR(BNO,RNO,RETURN_DAY) 试用关系代数表达式表示下列查询语句: [问题5] 检索借了书号为BOOKl这本书的读者号。

Why does the speaker mention what is printed on certain T-shirts

A. To show how politics have changed over the years.
B. To point out that T-shirts often provide personal information.
C. To illustrate how the printing on clothing has improved.
D. To support that T-shirts are a form of art.

[说明] 设有三个关系: BOOK (BNO,BNAME,PUBLISH_YEAR,PRICE,PRESS) READ(RNO,RNAME,DUTY) BR(BNO,RNO,RETURN_DAY) 试用关系代数表达式表示下列查询语句: [问题3] 检索在1988年以前出版的书名。

[说明]设有三个关系学生S(学号,姓名,性别,年龄,籍贯)课程C(课程号,课程名,任课老师,所用教材)学生成绩SC(学号,课程号,得分)其中规定各属性定义如下:学号:SNUM 姓名:SNAME 性别:SEX 年龄:AGE 籍贯:NATIVE课程号:CNUM 课程名:CNAME 任课老师:TEACHER 所用教材:BOOK得分:GRADE试用关系代数表达式表示下列查询语句。 [问题3]检索全部学生都选修的课程号。

答案查题题库