数据库应用上机实验指导书
3、验证用户U2权限的SQL语句及执行结果; 验证U2查询权限
SELECT JNO FROM SPJ WHERE SNO='S5';
25
数据库应用上机实验指导书
验证U2插入权限 insert into spj
values('s3','p2','j2','200') select* from spj;
验证U2修改权限 UPDATE SPJ SET SNO='S3'
WHERE SNO='S5' AND JNO='J1' AND PNO='P3' SELECT* FROM SPJ;
26
数据库应用上机实验指导书
验证U2删除权限 DELETE FROM SPJ WHERE SNO='S2' SELECT* FROM SPJ;
27
数据库应用上机实验指导书
4、撤销用户U1、U2权限的SQL语句; 先在U1界面撤销U1对U2的授权 revoke all privileges
on spj from u2;
再在sa界面撤销sa对U1的授权,cascade是撤销所有U1的联级revoke all privileges on spj
from u1 cascade;
撤销权限后验证
SELECT JNO FROM SPJ WHERE SNO='S1';
28