oracle中访问不同用户中的表时怎么办

如在访问数据库中的表时,当用户权限高的访问时如system访问scott(普通用户)中的emp表时

直接用 select * from scott.emp;而不需要scott的授权

反过来当普通用户scott访问system管理员中的zengpan表时,必须有system的授权:首先以system的身份登录给scott授权:grant select on zengpan to scott;

然后切换为scott用户:conn scott/orclhsp;这样才可以查询:select * from system.zengpan;

如要收回权限:需切换为system用户: conn system/orclhsp;

然后收回权限:revoke select on zengpan from scott;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值