freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

數(shù)據(jù)庫實驗報告三(編輯修改稿)

2024-08-22 11:19 本頁面
 

【文章內(nèi)容簡介】 用update_s觸發(fā)器。禁用之后,更新S表中的“sdept”字段的內(nèi)容,驗證觸發(fā)器是否還繼續(xù)正常工作。(5分)(1)禁用觸發(fā)器:use studentgodisable trigger update_son sgo (2)驗證: 已經(jīng)將“MA”更改為“IS”,如下圖所示: (6) 刪除update_s觸發(fā)器。(5分)use studentgodrop trigger update_sgo(7) 創(chuàng)建一個新的課程成績統(tǒng)計表 CAvgGrade(Cno, Snum, examSNum, avgGrade),分別表示課號,選該課程的學生人數(shù),參加考試人數(shù),該門課程的平均成績。利用觸發(fā)器實現(xiàn)如下的功能:當SC表中有記錄插入、刪除或者更新時,自動更新表CAvgGrade。注意SC表中的grade為NULL時表明該學生還未參加考試,計算平均成績時不需要計算該成績,但是grade為0即考試成績?yōu)?時,需要計算該成績。(10分)(1)創(chuàng)建統(tǒng)計表CAvgGrade:create table CAvgGrade( o char(10) primary key, snum int, examsnum int, avggrade float)(2)創(chuàng)建觸發(fā)器:use studentgocreate trigger upd_ins_dele_CAvgGradeon scafter update,insert,deleteasbegindeclare @o char(10)declare @snum intdeclare @examsum intdeclare @avggrade intselect @o=o from insertedselect @o=o from deletedselect @snum = COUNT (*) from sc where @o=oselect @examsum = COUNT(*) from sc where @o=o and grade=0select @avggrade = AVG(grade) from sc where @o=o and grade=0update CAvgGradesetsnum=@snum,o=@o,examsnum=@examsum,avggrade=@avggradewhere o=@oend (3)測試:A、(測試插入)use studentgoinsert into scvalues(39。9500539。,39。139。,88) 結果為: (CAvgGrade表) (sc表) B、(測試刪除)use studentgodelete from scwhere o=39。139。結果為: (CAvgGrade表) (sc表) C、(測試更改)update scset grade=99where
點擊復制文檔內(nèi)容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1