--不会出现你说的drop synonym之后还存在此对象SQL*Plus: Release 8.0.6.0.0 - Production on 星期二 12月 14 11:58:23 2010(c) Copyright 1999 Oracle Corporation. All rights reserved. Connected to: Oracle Database 10g Release 10.1.0.2.0 - ProductionSQL> conn ucnzp/ucnzp@cdfn01 Connected. SQL> create table tab_a(id number);Table created.SQL> insert into tab_a values(1);1 row created.SQL> insert into tab_a values(2);1 row created.SQL> commit;Commit complete.SQL> grant all on tab_a to ucnpp 2 ;Grant succeeded.SQL> conn ucnpp/ucnpp@cdfn01 Connected. SQL> select * from ucnzp.tab_a; ID ---------- 1 2SQL> create synonym tab_a for ucnzp.tab_a;Synonym created.SQL> select * from tab_a; ID ---------- 1 2SQL> drop synonym tab_a;Synonym dropped.SQL> select * from tab_a; select * from tab_a * ERROR at line 1: ORA-00942: 表或视图不存在 SQL> select * from ucnzp.tab_a; ID ---------- 1 2SQL> create synonym tab_a for ucnzp.tab_a;Synonym created.SQL> select * from tab_a; ID ---------- 1 2SQL>
--不会出现你说的drop synonym之后还存在此对象SQL*Plus: Release 8.0.6.0.0 - Production on 星期二 12月 14 11:58:23 2010(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to:
Oracle Database 10g Release 10.1.0.2.0 - ProductionSQL> conn ucnzp/ucnzp@cdfn01
Connected.
SQL> create table tab_a(id number);Table created.SQL> insert into tab_a values(1);1 row created.SQL> insert into tab_a values(2);1 row created.SQL> commit;Commit complete.SQL> grant all on tab_a to ucnpp
2 ;Grant succeeded.SQL> conn ucnpp/ucnpp@cdfn01
Connected.
SQL> select * from ucnzp.tab_a; ID
----------
1
2SQL> create synonym tab_a for ucnzp.tab_a;Synonym created.SQL> select * from tab_a; ID
----------
1
2SQL> drop synonym tab_a;Synonym dropped.SQL> select * from tab_a;
select * from tab_a
*
ERROR at line 1:
ORA-00942: 表或视图不存在
SQL> select * from ucnzp.tab_a; ID
----------
1
2SQL> create synonym tab_a for ucnzp.tab_a;Synonym created.SQL> select * from tab_a; ID
----------
1
2SQL>