See below snippets:
Select *
from dba_synonyms
where synonym_name='DUAL';
OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK
PUBLIC DUAL SYS DUAL (NULL)
We know that DUAL table is accessible by users. Lets create a table named DUAL under our schema (USER).
CREATE TABLE dual AS
SELECT * FROM dual;
Select * from dual;
insert into dual values('Y');
commit;
Select * from dual;
DUMMY
----------
X
Y
The Synonym is not referred unless the Synonym name is not used by any object under the USER/SCHEMA...
So , When creating tables in your schema, take a look at SYNONYMs declared as PUBLIC and try not to use them.
Select *
from dba_synonyms
where synonym_name='DUAL';
OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK
PUBLIC DUAL SYS DUAL (NULL)
We know that DUAL table is accessible by users. Lets create a table named DUAL under our schema (USER).
CREATE TABLE dual AS
SELECT * FROM dual;
Select * from dual;
insert into dual values('Y');
commit;
Select * from dual;
DUMMY
----------
X
Y
The Synonym is not referred unless the Synonym name is not used by any object under the USER/SCHEMA...
So , When creating tables in your schema, take a look at SYNONYMs declared as PUBLIC and try not to use them.
Comments