How can Oracle query tables of other users without adding a table user name

Question: how can Oracle access other users’ tables without adding a table user name

Reasons: 1. Convenient access to common tables

2. Hide the users of the table

3. Limit authority

Solution:

1、 Create consent word

         CREATE [PUBLIC] SYNONYM synonym_ name FOR [schema.] object[@db_ link];

2、 Create view

        create view DF_ YHJB_ BZ  as select * from MIS.DF_ YHJB_ BZ

3、 Modify current_ Schema parameter

The schema used to switch the current session. When parsing the object name, if there is no qualified schema name before the object name, Oracle will automatically query the matching objects under this schema.

for example, when the “Scott” user executes the “select * from EMPs;” statement, Oracle will query the “EMPs” table under the “Scott” architecture by default; however, if the “alter session set” current_ Schema = XX; the current schema of the session is changed. When this statement is executed, Oracle will query the EMPs table under XX schema.

Read More: