| [问题1] 请说出该程序段的功能。 declare @ a numeric(5,2),@ b numeric(5,2) set @ a=(select max(成绩)from score) set @ b=(select min(成绩)from score) print @ a-@ b |
| [问题2] 请说出该程序段的功能。 create procedure xxk6 ( @ a char (8),@ b varchar(10) ) as begin delete from score where学号=@ a and课程名=@ b end |
| [问题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) |
| [问题4] 请写出一条查询语句,要求显示出Score表中的全部数据,并要求当成绩为空时显示数值-1。 |
| [问题5] 请写出一条修改数据库定义的语句,将AAA数据库的初始大小更改为5MB,最大空间限定为10MB。 |