【正文】
級號 from 教師,授課where = and =gh)go select * from (default)go4.create function (num1 int,num2 int)returns intasbegindeclare max intset max=case when num1=num2 then num1 when num1=num2 then num2 endreturn maxend5.declare n int,i int,j int,k int set n=100while n=999 begin set i=n/100 set j=(nI*100)/10 set k=n%10 if n=i*i*i+j*j*j+k*k*k print cast(n as char(3))+39。)習(xí)題八一、填空題 4. scroll 5. fetch check option 9. 查詢 10. 更新二、選擇題 三、實踐題1.use jxglgocreate view informasselect 學(xué)號,姓名,性別,39。go2.select * from inform3.use jxglgocreate view Inform asselect * from 學(xué)生go insert into Inform (學(xué)號,姓名,性別) values (39。,39。該游標為動態(tài)游標39。非動態(tài)游標,包含總行數(shù)39。沒有打開游標39。該游標為動態(tài)游標39。非動態(tài)游標,包含總行數(shù)39。沒有打開游標39。是水仙花數(shù)39。0139。0139。不能輸入年齡小于10的學(xué)生39。張風(fēng)39。2008090939。0801010139。刪除了選修表數(shù)據(jù),有影響39。0802010239。已經(jīng)成功插入記錄!39。stu_login1_u39。stu_login2_u39。stu_login1_u39。myrole39。stu_login239。stu_login139。學(xué)號不存儲在學(xué)生表中,不能插入該記錄39。沒有影響39。0639。補考39。男39。0913011239。0139。0239。08010139。非動態(tài)游標,包含總行數(shù)39。該游標為動態(tài)游標39。沒有打開游標39。非動態(tài)游標,包含總行數(shù)39。該游標為動態(tài)游標39。沒有打開游標39。)運行結(jié)果:兩者都有數(shù)據(jù),因為通過視圖插入是直接對表的操作。,39。=總分from 學(xué)生where 性別=39。 set n=n+1 endgo6.create function score_info(xh char(8))returns total_score table (學(xué)號 char(8),姓名 char(6),性別 char(2),課程號 char(2),課程名稱 varchar(20),成績 numeric(5,1))asbegininsert total_scoreselect ,姓名,性別,課程名稱,from 學(xué)生,課程,選修where = and = and =xhreturn end go select * from score_info(39。,j) set i=i+1end3.create function (gh char(8)=39。goselect left(學(xué)號,6),count(*) from 學(xué)生where 籍貫=39。14.select 學(xué)號,姓名,籍貫 from 學(xué)生where 籍貫=39。 pute count(籍貫)或select 學(xué)號,姓名,籍貫 from 學(xué)生where 籍貫=39。 and 39。as 身份 from 教師 where 性別=39。as 身份 from 學(xué)生 where 性別=39。 and 出生日期=(select max(出生日期) from 學(xué)生where 性別=39。 and 出生日期=(select max(出生日期) from 學(xué)生where 性別=39。,總分from 學(xué)生3.select distinct(籍貫) from 學(xué)生4.select avg(總分) from 學(xué)生 group by 性別5.select * from 學(xué)生where 籍貫=39。,39。,39。(2)use library