SYS.ALL_SYNONYMS

The ALL_SYNONYMS view describes the synonyms accessible to the current user. These criteria determine the list of synonyms that ALL_SYNONYMS shows:

  • All private synonyms owned by the logged-in user, even if the base object is not accessible to the user.

  • All public synonyms, even if the base object is not accessible to the user.

  • All private synonyms owned by a different user, where the base object pointed to by the synonym or by nested synonyms is known to be accessible because of a grant to the logged-in user.

The base object can be a table, view, synonym, index, sequence, PL/SQL stored procedure, PL/SQL function, PL/SQL package, materialized view or cache group.

Related views

  • SYS.DBA_SYNONYMS describes all synonyms in the database.

  • SYS.USER_SYNONYMS describes the synonyms owned by the current user. This view does not display the OWNER column.

Columns

Column name Type Description

OWNER

VARCHAR2(30) INLINE

Owner of the synonym

SYNONYM_NAME

VARCHAR2(30) INLINE

Name of the synonym

TABLE_OWNER

VARCHAR2(30) INLINE

Owner of the object referenced by the synonym, or creator of the referring synonym if the target is a public synonym

TABLE_NAME

VARCHAR2(30) INLINE

Name of the object referenced by the synonym

DB_LINK

VARCHAR2(128) INLINE

Unused

This is reserved for future use. The value is always NULL.