Entering content frame

 SYNONYMS 

Using the system table SYNONYMS, you can determine the following database information, among other things:

·        All tables (Basis tables, view tables) for which the PUBLIC synonym SHORT-TAB was defined
SELECT tableowner, tablename
  FROM DOMAIN.SYNONYMS
    WHERE public = 'YES'
      AND synonymname = 'SHORT_TAB'

·        Private synonym for table HIS_TAB of user USER2
SELECT synonymname
  FROM DOMAIN.SYNONYMS
    WHERE owner = user
      AND tableowner = 'USER2'
      AND tablename = 'HIS_TAB'

Existence of a synonym: see TABLES

 

Leaving content frame