繁体   English   中英

如何在一个架构(crm)和用户(cus)中撤消对一个表的更新授权

[英]how to revoke update grant on one table in one schema(crm) and user(cus)

我在具有给定授予(选择,更新,插入,删除)的一个模式中有很多表,现在我想删除出席者表上的更新授予,我该如何执行模式(crm)用户(cus)表(出席)DB (开发)

以拥有ATTENDANCE表的用户身份连接

connect owner_username/its_password@database_name

接着

revoke update on attendance from some_user;

[编辑,请先阅读您的评论]

如果数据库中有许多用户,请考虑创建角色 例如,角色RS1和RS2。 然后

grant update, delete, select, insert on a1 to rs1;
grant select, insert on a1 to rs2;

然后,您可以将这些角色授予适当的用户。 可以执行所有操作的角色将被授予RS1角色,而其他角色将被授予RS2,例如

grant rs1 to s1;
grant rs2 to s2;
grant rs2 to s3;
grant rs1 to s1;

否则(即,如果您不想使用角色),则将所有这些特权直接授予每个用户。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM