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

正文內(nèi)容

數(shù)據(jù)庫實(shí)驗(yàn)報(bào)告二(編輯修改稿)

2024-08-31 02:01 本頁面
 

【文章內(nèi)容簡介】 create view V_SPJasselect SNO,PNO,QTYfrom SPJ,Jwhere =and =39。三建39。第二種方法:create view V_SPJasselect SNO,PNO,QTYfrom SPJwhere in( select JNO from J where =39。三建39。 )3. 用SQL語句完成第四版教材128頁第11題中的視圖查詢(10分,每小題5分)。(1)select PNO,sum(QTY) totalfrom V_SPJgroup by PNO(2)select * from V_SPJ where SNO=39。S139。4. 用SQL語句完成視圖的數(shù)據(jù)更新。(15分,每題5分)(1) 給視圖V_SPJ中增加一條數(shù)據(jù)。先建立instead of觸發(fā)器insert_spj:createtriggerinsert_spjonV_SPJInsteadofinsertAsBegindeclare@snochar(10)declare@pnochar(10)declare@qtyintselect@sno=sno,@pno=pno,@qty=qtyfrominsertedinsertintospj(sno,pno,jno,qty)values(@sno,@pno,39。J139。,@qty)end增加數(shù)據(jù):insert into V_SPJvalues(39。S339。,39。P539。,406)結(jié)果: (2) 修改視圖V_SPJ中的任意一條數(shù)據(jù)的供應(yīng)數(shù)量。 update V_SPJset QTY=666where PNO=39。P339。 and SNO=39。S239。(3) 刪除視圖V_SPJ中的任意一條數(shù)據(jù)(注意所創(chuàng)建視圖可以視圖消解時(shí),才能正常刪除,否則會(huì)刪除失敗;也可以考慮用instead of觸發(fā)器實(shí)現(xiàn))。 視圖連接有多個(gè)基表,不能正常刪除,建立觸發(fā)器delete_spj如下: create trigger delete_spjon V_SPJInstead of delete AsBegin declare @sno char(10) declare @pno char(10) declare @qty int select @sno=sno,@pno=pno,@qty=qty from deleted delete from SPJ where =@sno and =@PNO AND =39。J139。 AND =@QTY。end 刪除一條數(shù)據(jù):deletefrom V_SPJwhere SNO=39。S339。 and PNO=39。P139。 and QTY=200結(jié)果如下:5. 用圖形用戶界面對(duì)Student數(shù)據(jù)庫中C表的Cno字段創(chuàng)建一個(gè)降序排列的唯一索引,索引名稱IX_CNo。(5分)6. 使用SQL語句對(duì)Stud
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1