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