If Oracle has two users A and B, if A wants to access the table owned by B, the statement should be:
Copy codeThe Code is as follows:
SELECT * from B. TABLENAME.
I want to ask, can I modify the Oracle settings to change the language in which A accesses B's table to the same statement as that in user B's logon: SELECT * FROM TABLENAME?
Copy codeThe Code is as follows:
Create synonym tablename for B. TABLENAME;
In addition to creating synonyms on the first floor, user A must be granted the permission to access and change the word.
Copy codeThe Code is as follows:
Drop synonym tablename;
1. You can use a query to generate an SQL statement, such
Copy codeThe Code is as follows:
Select 'create synonym' | table_name | 'for a.' | table_name from dba_tables where owner = 'A'
Then execute these SQL statements. Or write the stored procedure.
2 select any table permissions allow access to all tables