Mega Code Archive

 
Categories / Oracle PLSQL / System Tables Views
 

Query dba_synonyms and user_catalog table

SQL> SQL> SELECT ds.owner owner, table_owner,   2         SUBSTR(dc.table_type,1,6) table_type,   3         ds.table_name table_name, synonym_name   4  FROM   dba_synonyms ds, user_catalog dc   5  WHERE  ds.table_name  = dc.table_name   6  and    rownum < 50   7  ORDER BY ds.owner, table_owner, table_type, ds.table_name; no rows selected SQL>