以超级用户身份登录,如何授予用户访问特定架构下的特定表的权限。
我试过这个
表 this_schema.my_table 上的 GRANT SELECT TO my_user
但是当我以 my_user 身份登录时,我无法从表中进行选择。我不希望 my_user 有权访问 this_schema 中的任何其他表。
这可能吗?
小智 7
Yes its possible. You can use following command, to give select access of specific table to specific user.
GRANT SELECT on SCHEMA_NAME.TABLE_NAME TO USER_NAME;
Run Code Online (Sandbox Code Playgroud)
NOTE: user still list and describe other tables in the given schema.
您还需要在架构上授予使用权
GRANT USAGE ON SCHEMA this_schema TO GROUP my_user;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6060 次 |
| 最近记录: |