alter session
login schema1/schema1 @ db
> create table schema1.test_table (id number(1));
Table created.
> insert into shchema1.test_table values(1);
1 row created;
> commit;
Commit complete;
> grant select on test_table to schema2;
Grant succeeded.
> commit;
Commit complete;
login schema2/schema2 @ db
> select * from schema1.test_table;
ID
---------
1
> select * from test_table;
ERROR at line 1:
ORA-00942: table or view does not exist
> alter session set current_schema = schema1;
Session altered
> select * from test_table;
ID
---------
1
(Lasīt komentārus)
Nopūsties: