首页 > 解决方案 > 授予 Oracle 中其他用户的表传递

问题描述

有什么办法可以将其他用户创建并授予我的表授予其他人?我尝试“将 table_name 上的所有内容授予用户”,但我的同事无法将此表授予其他人。

标签: oracle

解决方案


在 oracle 中,您可以使用 WITH GRANT OPTION。

对象的所有者可以通过在 GRANT 语句中指定WITH GRANT OPTION子句将其授予另一个用户。在这种情况下,新的被授权者可以将相同级别的访问权限授予其他用户或角色。

-- Owner of table1 is schema1
GRANT SELECT ON table1 TO Schema_2 WITH GRANT OPTION;
-- Schema2 can grant the same privileges to another schema
-- execute from Schema2
GRANT SELECT ON Schema_1.table1 TO Schema_3;

希望,这对你有用。

干杯!!


推荐阅读