ICode9

精准搜索请尝试: 精确搜索
首页 > 数据库> 文章详细

第四章课后作业 数据库课程

2021-04-18 22:00:22  阅读:208  来源: 互联网

标签:职工 revoke grant -- 数据库 select 课后 table 第四章


以下为标准SQL的答案

6、

grant all privileces on table 学生,班级 to U1 with grant option; -- (1)
grant select,update(家庭地址) on table 学生 to U2; -- (2)
grant select on table 班级 to public; -- (3)
grant select,update on table 学生 to R1; -- (4)
grant R1 to U1 with admin option; -- (5)

7、

grant select on table 职工,部门 to 王明; -- (1)
grant insert,delete on table 职工,部门 to 李勇; -- (2)
grant select on table 职工 when user()=name to all; -- (3)
grant select,update(工资) on table 职工 to 刘星; -- (4)
grant alter table on table 职工,部门 to 张新; -- (5)
grant all privileces on table 职工,部门 to 周平 with grant option; -- (6)

create view 各部门工资 
as
select 名称,max(工资) as 最高工资,min(工资) as 最低工资,avg(工资) as 平均工资 from 职工,部门 
where 职工.部门号=部门.部门号 
group by 职工.部门号; -- 建立视图
grant select on table 各部门工资 to 杨兰; -- (7)

8、

revoke select on table 职工,部门 from 王明; -- (1)
revoke insert,delete on table 职工,部门 from 李勇; -- (2)
revoke select on table 职工 when user()=name from all; -- (3)
revoke select,update(工资) on table 职工 from 刘星; -- (4)
revoke alter table on table 职工,部门 from 张新; -- (5)
revoke all privileces on table 职工,部门 from 周平; -- (6)
revoke select on table 各部门工资 from 杨兰; -- (7)

标签:职工,revoke,grant,--,数据库,select,课后,table,第四章
来源: https://blog.csdn.net/ccmtvv/article/details/115840111

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有