oracle分配权限:一个用户访问另一个用户的表


相当于alias(别名),比如把user1.table1在user2中建一个同义词table1 
create synonym table1 for user1.table1;
这样当你在user2中查select * from table1时就相当于查select * from user1.table1;

 

//批量生成创建同义词
select 'create synonym '||object_name||' for jys.'||object_name||';' from dba_objects where owner='JYS' and object_type='TABLE';

 

不然就是在表前加用户名

select * from user1.table1

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM