您的位置:首页 > 数据库 > Oracle

oracle将A用户下的所有表的查看权限赋予给B用户

2013-11-20 16:24 183 查看
登录scott/tiger,然后查询select 'grant select on '||tname||' to robbie;' from tab

tab表存储当前登录用户的所有表,tname是表名,查询结果:

grant select on DEPT to robbie;

grant select on EMP to robbie;

grant select on BONUS to robbie;

grant select on SALGRADE to
robbie;

grant select on STOCK_RECEIVED to
robbie;

然后执行这个查询结果集,就可以了,需要主意的是,scott用户必须有grant权限。

注意:grant select
any table to robbie; //该语句意思是将所有表的访问权限赋予给robbie.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: