【文章內(nèi)容簡(jiǎn)介】
ble b(x number,y date)。在user_two中查詢(xún)表A select * from 。3 / 14從user_one中刪除表B drop table 。在user_two中查詢(xún)表B Select * fromb。在user_two中建立視圖VIEW_A create view view_a(x,y)as select x,yfrom b。/ 145.用系統(tǒng)帳戶(hù)sys登錄數(shù)據(jù)庫(kù),創(chuàng)建用戶(hù)user_three,將角色權(quán)限D(zhuǎn)BA授予用戶(hù)user_three,并將S、P、J、SPJ四張表導(dǎo)入到user_three模式下。create user user_threeidentified by 980916default tablespace userstemporary tablespace tempquota unlimited on users。grant dba to user_three。/ 146.使用user_three登錄,完成如下授權(quán),在user_one和user_two用戶(hù)下執(zhí)行相應(yīng)的SQL語(yǔ)句驗(yàn)證授權(quán)是否成功。(1)把對(duì)表S的INSERT權(quán)力授予用戶(hù)user_one,并允許他再將此權(quán)限授予其他用戶(hù)。grant insert on s to user_one with grant option。在user_one中插入數(shù)據(jù)insert into (sno,sname,city,sphone)values(39。139。,39。a39。,39。湖北39。,null)。mit。grant insert on to user_two。在user_two中插入數(shù)據(jù)insert into (sno,sname,city,sphone)6 / 14values(39。239。,39。b39。,39。湖北39。,null)。mit。(2)用戶(hù)user_two對(duì)S,P,J三個(gè)表有SELECT和INSERT權(quán)力grant select,insert on s to user_two。grant select,insert on p to user_two。grant select,insert on j to user_two。從user_two中查詢(xún)表S select * from 。/ 14從user_two中給表S插入數(shù)據(jù)insert into (sno,sname,city,sphone)values(39。339。,39。c39。,39。湖北39。,null)。mit。(3)用戶(hù)user_one對(duì)SPJ表有DELETE權(quán)力,對(duì)QTY字段具有UPDATE權(quán)力。grant delete,update(qty)on spj to user_one。在user_one中刪除sno為s1