SYS@hzh> create view t as select * from dba_users;
View created.
SYS@hzh> create public synonym ttt for t;
Synonym created.
SH@hzh> select * from t;
select * from t
*
ERROR at line 1:
ORA-00942: table or view does not exist
SH@hzh> select * from sys.t;
select * from sys.t
*
ERROR at line 1:
ORA-00942: table or view does not exist
SH@hzh> select * from ttt;
select * from ttt
*
ERROR at line 1:
ORA-00942: table or view does not exist
------------------------------------------------------------------------
①快照
SYS@hzh> grant all on t to public;
Grant succeeded.
SH@hzh> select * from t;
select * from t
*
ERROR at line 1:
ORA-00942: table or view does not exist
SH@hzh> select count(*) from sys.t
2 ;
COUNT(*)
----------
11
SH@hzh> select count(*) from ttt;
COUNT(*)
----------
11
------------------------------------------------------------------------------------------------------
②快照
SYS@hzh> grant all on ttt to public;
Grant succeeded.
SH@hzh> select * from t;
select * from t
*
ERROR at line 1:
ORA-00942: table or view does not exist
SH@hzh> select count(*) from sys.t;
COUNT(*)
----------
11
SH@hzh> select count(*) from ttt;
COUNT(*)
----------
11
--kingsql作品
转载请注明出处
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28389881/viewspace-756276/ ,如需转载,请注明出处,否则将追究法律责任。