You have the HOTEL Demo Schema for the SQL Tutorial.
Log on to the database instance DEMODB as user MONA.
Define synonyms. To do this, use the CREATE SYNONYM Statement (create_synonym_statement).
You can use the system tableSYNONYMS to determine the following database information, among other things:
· The table (basis table, view table) 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 the CITY table of the user MONA
SELECT synonymname
FROM DOMAIN.SYNONYMS
WHERE tableschemaname = 'HOTEL'
AND tableowner = 'MONA'
AND tablename = 'CITY'
Existence of a synonym: see TABLES