6
首先列出关系
Student(Sno,Sname,Sage,Ssex,Sadd,Cno)
Class(Cno,Cname,Ctea,Mon)
(1)
GRANT ALL PRIVILEGES
ON Student,Class
TO U1
WITH CHECK OPTION
(2)
GRANT SELECT,UPDATE(Sadd)
ON Student
TO U2
(3)
GRANT SELECT
ON Class
TO PUBLIC
(4)
GRANT SELECT,UPDATE
ON Student
TO R1
(5)
GRANT R1
TO U1
WITH ADMIN OPTION
7
grant select
on table 职工,部门
to 王平
grant delect,update
on table 职工,部门
to 李勇
3)这个题目参考了同学的内容在后面会给出链接
grant select
on table 职工
when user()=姓名
grant select ,update(工资)
on table 职工
to 刘星
grant alter
on 职工,部门
to 张新
grant all privileges
on table 职工,部门
to 周平
with grant option
create view money(num,max_money,min_money,avg_money)
as
select 部门号,max(工资),min(工资),avg(工资)
from 职工
group by 部门号
grant select
on money
to 杨兰
8
1.
revoke select
on table 职工,部门
from 王平
revoke insert ,delete
on table 职工,部门
from 李勇
revoke select
on table 职工
when user()=名称
to public
revoke select ,update(工资)
on table 职工
from 刘星
revoke alter
on table 职工,部门
from 张新
revoke all privileges
on 职工
from 周平 cascade
(7)
revoke select
on view money
from 杨兰